fix new clippy lints
This commit is contained in:
parent
0d4e05e6a4
commit
c96784c0eb
@ -40,6 +40,7 @@ impl MediaManager {
|
||||
/// appended to the name.
|
||||
///
|
||||
/// Also notes the file in the media database.
|
||||
#[allow(clippy::match_like_matches_macro)]
|
||||
pub fn add_file<'a>(
|
||||
&self,
|
||||
ctx: &mut MediaDatabaseContext,
|
||||
|
@ -515,7 +515,7 @@ mod test {
|
||||
col.update_note(&mut note)?;
|
||||
let existing = col.storage.existing_cards_for_note(note.id)?;
|
||||
let mut ords = existing.iter().map(|a| a.ord).collect::<Vec<_>>();
|
||||
ords.sort();
|
||||
ords.sort_unstable();
|
||||
assert_eq!(ords, vec![0, 1, 2, 499]);
|
||||
|
||||
Ok(())
|
||||
|
@ -160,10 +160,7 @@ fn write_order(sql: &mut String, kind: SortKind, reverse: bool) -> Result<()> {
|
||||
|
||||
fn needs_aux_sort_table(kind: SortKind) -> bool {
|
||||
use SortKind::*;
|
||||
match kind {
|
||||
CardDeck | NoteType | CardTemplate => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(kind, CardDeck | NoteType | CardTemplate)
|
||||
}
|
||||
|
||||
fn prepare_sort(col: &mut Collection, kind: SortKind) -> Result<()> {
|
||||
|
Loading…
Reference in New Issue
Block a user