cargo fmt
This commit is contained in:
parent
ecf50dde2b
commit
b343068805
@ -11,7 +11,12 @@ use std::io;
|
|||||||
|
|
||||||
use models::Source;
|
use models::Source;
|
||||||
|
|
||||||
#[fail(display = "Request to {} returned {}. Context: {}", url, status_code, context)]
|
#[fail(
|
||||||
|
display = "Request to {} returned {}. Context: {}",
|
||||||
|
url,
|
||||||
|
status_code,
|
||||||
|
context
|
||||||
|
)]
|
||||||
#[derive(Fail, Debug)]
|
#[derive(Fail, Debug)]
|
||||||
pub struct HttpStatusError {
|
pub struct HttpStatusError {
|
||||||
url: String,
|
url: String,
|
||||||
@ -58,7 +63,10 @@ pub enum DataError {
|
|||||||
HttpStatusGeneral(HttpStatusError),
|
HttpStatusGeneral(HttpStatusError),
|
||||||
#[fail(display = "FIXME: This should be better")]
|
#[fail(display = "FIXME: This should be better")]
|
||||||
F301(Source),
|
F301(Source),
|
||||||
#[fail(display = "Error occured while Parsing an Episode. Reason: {}", reason)]
|
#[fail(
|
||||||
|
display = "Error occured while Parsing an Episode. Reason: {}",
|
||||||
|
reason
|
||||||
|
)]
|
||||||
ParseEpisodeError { reason: String, parent_id: i32 },
|
ParseEpisodeError { reason: String, parent_id: i32 },
|
||||||
#[fail(display = "Episode was not changed and thus skipped.")]
|
#[fail(display = "Episode was not changed and thus skipped.")]
|
||||||
EpisodeNotChanged,
|
EpisodeNotChanged,
|
||||||
|
|||||||
@ -1,27 +1,56 @@
|
|||||||
#![recursion_limit = "1024"]
|
#![recursion_limit = "1024"]
|
||||||
#![allow(unknown_lints)]
|
#![allow(unknown_lints)]
|
||||||
#![cfg_attr(all(test, feature = "clippy"), allow(option_unwrap_used, result_unwrap_used))]
|
#![cfg_attr(
|
||||||
|
all(test, feature = "clippy"),
|
||||||
|
allow(option_unwrap_used, result_unwrap_used)
|
||||||
|
)]
|
||||||
#![cfg_attr(feature = "cargo-clippy", allow(option_map_unit_fn))]
|
#![cfg_attr(feature = "cargo-clippy", allow(option_map_unit_fn))]
|
||||||
#![cfg_attr(
|
#![cfg_attr(
|
||||||
feature = "clippy",
|
feature = "clippy",
|
||||||
warn(
|
warn(
|
||||||
option_unwrap_used, result_unwrap_used, print_stdout, wrong_pub_self_convention, mut_mut,
|
option_unwrap_used,
|
||||||
non_ascii_literal, similar_names, unicode_not_nfc, enum_glob_use, if_not_else,
|
result_unwrap_used,
|
||||||
items_after_statements, used_underscore_binding
|
print_stdout,
|
||||||
|
wrong_pub_self_convention,
|
||||||
|
mut_mut,
|
||||||
|
non_ascii_literal,
|
||||||
|
similar_names,
|
||||||
|
unicode_not_nfc,
|
||||||
|
enum_glob_use,
|
||||||
|
if_not_else,
|
||||||
|
items_after_statements,
|
||||||
|
used_underscore_binding
|
||||||
)
|
)
|
||||||
)]
|
)]
|
||||||
// Enable lint group collections
|
// Enable lint group collections
|
||||||
#![warn(nonstandard_style, edition_2018, rust_2018_idioms, bad_style, unused)]
|
#![warn(
|
||||||
|
nonstandard_style,
|
||||||
|
edition_2018,
|
||||||
|
rust_2018_idioms,
|
||||||
|
bad_style,
|
||||||
|
unused
|
||||||
|
)]
|
||||||
// standalone lints
|
// standalone lints
|
||||||
#![warn(
|
#![warn(
|
||||||
const_err, improper_ctypes, non_shorthand_field_patterns, no_mangle_generic_items,
|
const_err,
|
||||||
overflowing_literals, plugin_as_library, private_no_mangle_fns, private_no_mangle_statics,
|
improper_ctypes,
|
||||||
unconditional_recursion, unions_with_drop_fields, while_true, missing_debug_implementations,
|
non_shorthand_field_patterns,
|
||||||
missing_docs, trivial_casts, trivial_numeric_casts, elided_lifetime_in_paths,
|
no_mangle_generic_items,
|
||||||
|
overflowing_literals,
|
||||||
|
plugin_as_library,
|
||||||
|
private_no_mangle_fns,
|
||||||
|
private_no_mangle_statics,
|
||||||
|
unconditional_recursion,
|
||||||
|
unions_with_drop_fields,
|
||||||
|
while_true,
|
||||||
|
missing_debug_implementations,
|
||||||
|
missing_docs,
|
||||||
|
trivial_casts,
|
||||||
|
trivial_numeric_casts,
|
||||||
|
elided_lifetime_in_paths,
|
||||||
missing_copy_implementations
|
missing_copy_implementations
|
||||||
)]
|
)]
|
||||||
#![deny(warnings)]
|
#![deny(warnings)]
|
||||||
|
|
||||||
// warn when code is not using dyn Trait syntax. req rustc 1.27
|
// warn when code is not using dyn Trait syntax. req rustc 1.27
|
||||||
// #![deny(bare_trait_object)]
|
// #![deny(bare_trait_object)]
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,35 @@
|
|||||||
#![recursion_limit = "1024"]
|
#![recursion_limit = "1024"]
|
||||||
#![allow(unknown_lints)]
|
#![allow(unknown_lints)]
|
||||||
#![cfg_attr(feature = "cargo-clippy", allow(blacklisted_name, option_map_unit_fn))]
|
#![cfg_attr(
|
||||||
|
feature = "cargo-clippy",
|
||||||
|
allow(blacklisted_name, option_map_unit_fn)
|
||||||
|
)]
|
||||||
// Enable lint group collections
|
// Enable lint group collections
|
||||||
#![warn(nonstandard_style, edition_2018, rust_2018_idioms, bad_style, unused)]
|
#![warn(
|
||||||
|
nonstandard_style,
|
||||||
|
edition_2018,
|
||||||
|
rust_2018_idioms,
|
||||||
|
bad_style,
|
||||||
|
unused
|
||||||
|
)]
|
||||||
// standalone lints
|
// standalone lints
|
||||||
#![warn(
|
#![warn(
|
||||||
const_err, improper_ctypes, non_shorthand_field_patterns, no_mangle_generic_items,
|
const_err,
|
||||||
overflowing_literals, plugin_as_library, private_no_mangle_fns, private_no_mangle_statics,
|
improper_ctypes,
|
||||||
unconditional_recursion, unions_with_drop_fields, while_true, missing_debug_implementations,
|
non_shorthand_field_patterns,
|
||||||
trivial_casts, trivial_numeric_casts, elided_lifetime_in_paths, missing_copy_implementations
|
no_mangle_generic_items,
|
||||||
|
overflowing_literals,
|
||||||
|
plugin_as_library,
|
||||||
|
private_no_mangle_fns,
|
||||||
|
private_no_mangle_statics,
|
||||||
|
unconditional_recursion,
|
||||||
|
unions_with_drop_fields,
|
||||||
|
while_true,
|
||||||
|
missing_debug_implementations,
|
||||||
|
trivial_casts,
|
||||||
|
trivial_numeric_casts,
|
||||||
|
elided_lifetime_in_paths,
|
||||||
|
missing_copy_implementations
|
||||||
)]
|
)]
|
||||||
#![deny(warnings)]
|
#![deny(warnings)]
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,39 @@
|
|||||||
#![cfg_attr(
|
#![cfg_attr(
|
||||||
feature = "cargo-clippy",
|
feature = "cargo-clippy",
|
||||||
allow(clone_on_ref_ptr, blacklisted_name, match_same_arms, option_map_unit_fn)
|
allow(
|
||||||
|
clone_on_ref_ptr,
|
||||||
|
blacklisted_name,
|
||||||
|
match_same_arms,
|
||||||
|
option_map_unit_fn
|
||||||
|
)
|
||||||
)]
|
)]
|
||||||
#![allow(unknown_lints)]
|
#![allow(unknown_lints)]
|
||||||
// Enable lint group collections
|
// Enable lint group collections
|
||||||
#![warn(nonstandard_style, edition_2018, rust_2018_idioms, bad_style, unused)]
|
#![warn(
|
||||||
|
nonstandard_style,
|
||||||
|
edition_2018,
|
||||||
|
rust_2018_idioms,
|
||||||
|
bad_style,
|
||||||
|
unused
|
||||||
|
)]
|
||||||
// standalone lints
|
// standalone lints
|
||||||
#![warn(
|
#![warn(
|
||||||
const_err, improper_ctypes, non_shorthand_field_patterns, no_mangle_generic_items,
|
const_err,
|
||||||
overflowing_literals, plugin_as_library, private_no_mangle_fns, private_no_mangle_statics,
|
improper_ctypes,
|
||||||
unconditional_recursion, unions_with_drop_fields, while_true, missing_debug_implementations,
|
non_shorthand_field_patterns,
|
||||||
trivial_casts, trivial_numeric_casts, elided_lifetime_in_paths, missing_copy_implementations
|
no_mangle_generic_items,
|
||||||
|
overflowing_literals,
|
||||||
|
plugin_as_library,
|
||||||
|
private_no_mangle_fns,
|
||||||
|
private_no_mangle_statics,
|
||||||
|
unconditional_recursion,
|
||||||
|
unions_with_drop_fields,
|
||||||
|
while_true,
|
||||||
|
missing_debug_implementations,
|
||||||
|
trivial_casts,
|
||||||
|
trivial_numeric_casts,
|
||||||
|
elided_lifetime_in_paths,
|
||||||
|
missing_copy_implementations
|
||||||
)]
|
)]
|
||||||
#![deny(warnings)]
|
#![deny(warnings)]
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user