Skip to content

Commit

Permalink
Formatting, clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shssoichiro committed Jul 17, 2022
1 parent 2586b26 commit 4804462
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
17 changes: 15 additions & 2 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
unstable_features = true
edition = "2021"
use_field_init_shorthand = true
use_try_shorthand = true

# Unstable features--for future stabilization
imports_layout = "HorizontalVertical"
imports_granularity = "Crate"
group_imports = "StdExternalCrate"
format_strings = true
format_strings = true
format_macro_matchers = true
format_macro_bodies = true
hex_literal_case = "Lower"
normalize_comments = true
normalize_doc_attributes = true
overflow_delimited_expr = true
reorder_impl_items = true
wrap_comments = true
format_code_in_doc_comments = true
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ pub fn new_detector<R: Read, T: Pixel>(
///
/// # Arguments
///
/// - `progress_callback`: An optional callback that will fire after each frame is analyzed.
/// Arguments passed in will be, in order,
/// the number of frames analyzed, and the number of keyframes detected.
/// This is generally useful for displaying progress, etc.
/// - `progress_callback`: An optional callback that will fire after each frame
/// is analyzed. Arguments passed in will be, in order, the number of frames
/// analyzed, and the number of keyframes detected. This is generally useful
/// for displaying progress, etc.
#[allow(clippy::needless_pass_by_value)]
pub fn detect_scene_changes<R: Read, T: Pixel>(
dec: &mut Decoder<R>,
Expand Down Expand Up @@ -184,7 +184,7 @@ pub fn detect_scene_changes<R: Read, T: Pixel>(
}
}

#[derive(Clone, Copy, Debug, PartialOrd, PartialEq)]
#[derive(Clone, Copy, Debug, PartialOrd, PartialEq, Eq)]
pub enum SceneDetectionSpeed {
/// Fastest scene detection using pixel-wise comparison
Fast,
Expand Down

0 comments on commit 4804462

Please sign in to comment.