Cleaned up some warnings in user_management
*sweep sweep sweep sweep sweep*
This commit is contained in:
parent
18228bb1c5
commit
abcb296574
|
@ -71,7 +71,7 @@ impl UserManager {
|
|||
/// # Errors
|
||||
/// An error is thrown if there is an error reading from the database or if data
|
||||
/// recieved from the database is corrupt
|
||||
pub fn lookup_user<'de, UserData>(
|
||||
pub fn lookup_user<UserData>(
|
||||
&self,
|
||||
username: impl AsRef<[u8]>
|
||||
) -> Result<Option<PartialUser<UserData>>>
|
||||
|
@ -93,7 +93,7 @@ impl UserManager {
|
|||
///
|
||||
/// # Panics
|
||||
/// Pancis if the database is corrupt
|
||||
pub fn get_user<'de, UserData>(
|
||||
pub fn get_user<UserData>(
|
||||
&self,
|
||||
cert: Option<&Certificate>
|
||||
) -> Result<User<UserData>>
|
||||
|
|
|
@ -23,8 +23,6 @@ mod manager;
|
|||
pub use manager::UserManager;
|
||||
pub use user::User;
|
||||
pub use manager::CertificateData;
|
||||
use crate::types::Request;
|
||||
use user::{NotSignedInUser, SignedInUser};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum UserManagerError {
|
||||
|
|
|
@ -42,13 +42,13 @@ impl<UserData> PartialUser<UserData> {
|
|||
/// A list of certificate hashes registered to this user
|
||||
///
|
||||
/// Can be looked up using [`UserManager::lookup_certificate()`] to get full information
|
||||
pub fn certificates(&self) -> &Vec<u32> {
|
||||
pub const fn certificates(&self) -> &Vec<u32> {
|
||||
&self.certificates
|
||||
}
|
||||
|
||||
/// The bcrypt hash of the user's password
|
||||
pub fn pass_hash(&self) -> Option<&str> {
|
||||
self.pass_hash.as_ref().map(|s| s.as_str())
|
||||
self.pass_hash.as_deref()
|
||||
}
|
||||
|
||||
/// Write user data to the database
|
||||
|
|
Loading…
Reference in a new issue