Refine from pedantic, remove erratic consts

This commit is contained in:
Luke Parker
2023-07-08 01:26:08 -04:00
parent 286e96ccd8
commit 3ca76c51e4
36 changed files with 192 additions and 335 deletions

View File

@@ -82,7 +82,6 @@ impl Default for MemDb {
impl MemDb {
/// Create a new in-memory database.
#[must_use]
pub fn new() -> Self {
Self::default()
}

View File

@@ -24,17 +24,14 @@ mod shims {
}
impl Error {
#[must_use]
pub fn new<E: 'static + Send + Sync>(kind: ErrorKind, error: E) -> Self {
Self { kind, error: Box::new(error) }
}
#[must_use]
pub const fn kind(&self) -> ErrorKind {
self.kind
}
#[must_use]
pub fn into_inner(self) -> Option<Box<dyn Send + Sync>> {
Some(self.error)
}