Skip to content

Commit 7fe95f0

Browse files
Fix clippy warnings: is_none_or, items after test module
1 parent b2f0059 commit 7fe95f0

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

crates/contextdb-cli/src/repl.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,19 +124,6 @@ fn render_column_type(col_type: &ColumnType) -> String {
124124
}
125125
}
126126

127-
#[cfg(test)]
128-
mod tests {
129-
use super::*;
130-
131-
#[test]
132-
fn test_backslash_dt() {
133-
let db = Database::open_memory();
134-
db.execute("CREATE TABLE t (id UUID PRIMARY KEY)", &HashMap::new())
135-
.unwrap();
136-
assert!(handle_meta_command(&db, "\\dt"));
137-
}
138-
}
139-
140127
fn execute_sql(db: &Database, sql: &str) {
141128
match db.execute(sql, &HashMap::new()) {
142129
Ok(result) => {
@@ -149,3 +136,16 @@ fn execute_sql(db: &Database, sql: &str) {
149136
Err(e) => eprintln!("Error: {}", e),
150137
}
151138
}
139+
140+
#[cfg(test)]
141+
mod tests {
142+
use super::*;
143+
144+
#[test]
145+
fn test_backslash_dt() {
146+
let db = Database::open_memory();
147+
db.execute("CREATE TABLE t (id UUID PRIMARY KEY)", &HashMap::new())
148+
.unwrap();
149+
assert!(handle_meta_command(&db, "\\dt"));
150+
}
151+
}

crates/contextdb-relational/src/store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl RelationalStore {
7777
.get(table)
7878
.and_then(|m| m.state_machine.as_ref())
7979
.filter(|sm| sm.column == column)
80-
.map_or(true, |sm| {
80+
.is_none_or(|sm| {
8181
sm.transitions
8282
.get(from)
8383
.is_some_and(|targets| targets.iter().any(|t| t == to))

0 commit comments

Comments
 (0)