Skip to content

Commit

Permalink
Tweak some Clippy allows
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgrinaker committed Feb 3, 2025
1 parent 64608b9 commit 10ee125
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![warn(clippy::all)]
#![allow(clippy::new_without_default)]
#![allow(clippy::module_inception)]

pub mod client;
pub mod encoding;
Expand Down
2 changes: 0 additions & 2 deletions src/sql/engine/engine.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(clippy::module_inception)]

use std::collections::{BTreeMap, BTreeSet};

use super::Session;
Expand Down
2 changes: 0 additions & 2 deletions src/sql/parser/parser.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(clippy::module_inception)]

use std::iter::Peekable;

use super::{ast, Keyword, Lexer, Token};
Expand Down
12 changes: 2 additions & 10 deletions src/sql/planner/planner.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(clippy::module_inception)]

use std::collections::{BTreeMap, HashMap, HashSet};

use itertools::{Either, Itertools as _};
Expand Down Expand Up @@ -577,6 +575,7 @@ impl<'a, C: Catalog> Planner<'a, C> {
/// currently visible and what names they have. During expression planning, the
/// scope is used to resolve column names to column indexes, which are placed in
/// the plan and used during execution.
#[derive(Default)]
pub struct Scope {
/// The currently visible columns. If empty, only constant expressions can
/// be used (no column references).
Expand All @@ -603,14 +602,7 @@ pub struct Scope {
impl Scope {
/// Creates a new, empty scope.
pub fn new() -> Self {
Self {
columns: Vec::new(),
tables: HashSet::new(),
qualified: HashMap::new(),
unqualified: HashMap::new(),
aggregates: HashMap::new(),
hidden: HashSet::new(),
}
Self::default()
}

/// Creates a scope from a table, using the table's original name.
Expand Down
3 changes: 2 additions & 1 deletion src/storage/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ use crate::error::Result;

/// An in-memory key/value storage engine using the Rust standard library B-tree
/// implementation. Data is not persisted.
#[derive(Default)]
pub struct Memory {
data: BTreeMap<Vec<u8>, Vec<u8>>,
}

impl Memory {
/// Creates a new Memory key-value storage engine.
pub fn new() -> Self {
Self { data: BTreeMap::new() }
Self::default()
}
}

Expand Down

0 comments on commit 10ee125

Please sign in to comment.