Skip to content

Commit 21830cd

Browse files
committed
Fix clippy lints (except unused method I can't explain)
1 parent e54e728 commit 21830cd

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

crates/core/src/host/module_host.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,6 @@ impl Instance {
395395
}
396396
}
397397

398-
pub trait ModuleInstance: Send + 'static {}
399-
400398
/// Creates the table for `table_def` in `stdb`.
401399
pub fn create_table_from_def(
402400
stdb: &RelationalDB,
@@ -981,7 +979,6 @@ impl ModuleHost {
981979
me.call_identity_disconnected_inner(caller_identity, caller_connection_id, inst)
982980
})
983981
.await?
984-
.map_err(Into::into)
985982
}
986983

987984
/// Empty the system tables tracking clients without running any lifecycle reducers.

crates/core/src/host/wasm_common/instrumentation.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ pub struct CallTimes {
9191
times: EnumMap<AbiCall, Duration>,
9292
}
9393

94+
impl Default for CallTimes {
95+
fn default() -> Self {
96+
Self::new()
97+
}
98+
}
99+
94100
impl CallTimes {
95101
/// Create a new timing structure, with times for all calls set to zero.
96102
pub fn new() -> Self {
@@ -115,6 +121,6 @@ impl CallTimes {
115121
/// will `take`` the CallTimes after running a reducer and report the taken times,
116122
/// leaving a fresh zeroed CallTimes for the next reducer invocation.
117123
pub fn take(&mut self) -> CallTimes {
118-
std::mem::replace(self, Self::new())
124+
std::mem::take(self)
119125
}
120126
}

crates/core/src/startup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,6 @@ impl DatabaseCores {
443443
/// let database_cores = cores.databases.make_database_runners(rt.handle());
444444
/// ```
445445
pub fn make_database_runners(self, global_runtime: &tokio::runtime::Handle) -> JobCores {
446-
JobCores::from_pinned_cores(self.0.into_iter(), global_runtime.clone())
446+
JobCores::from_pinned_cores(self.0, global_runtime.clone())
447447
}
448448
}

0 commit comments

Comments
 (0)