Skip to content

Commit 651b6df

Browse files
committed
refactor: adjust type of impl block in legacy::post::register
We return a fully authenticated user, so it makes no sense for this to be an impl block on AuthenticatedUser<NoAuth>, especially since this function doesn't even take &self. Signed-off-by: stadust <43299462+stadust@users.noreply.github.com>
1 parent b4f1bbd commit 651b6df

File tree

1 file changed

+3
-3
lines changed
  • pointercrate-user/src/auth/legacy

1 file changed

+3
-3
lines changed

pointercrate-user/src/auth/legacy/post.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::Result;
77
mod register {
88
use super::*;
99
use crate::{
10-
auth::{AuthenticatedUser, AuthenticationType, NoAuth, PasswordOrBrowser},
10+
auth::{AuthenticatedUser, AuthenticationType, PasswordOrBrowser},
1111
error::UserError,
1212
User,
1313
};
@@ -20,8 +20,8 @@ mod register {
2020
pub password: String,
2121
}
2222

23-
impl AuthenticatedUser<NoAuth> {
24-
pub async fn register(registration: Registration, connection: &mut PgConnection) -> Result<AuthenticatedUser<PasswordOrBrowser>> {
23+
impl AuthenticatedUser<PasswordOrBrowser> {
24+
pub async fn register(registration: Registration, connection: &mut PgConnection) -> Result<Self> {
2525
log::info!("Attempting registration of new user under name {}", registration.name);
2626

2727
log::trace!("Registration request is formally correct");

0 commit comments

Comments
 (0)