Make readability fixes to Rust code comments (#157)

This commit is contained in:
Ryan Russell 2022-09-16 20:50:10 -05:00 committed by GitHub
parent 8403238dbb
commit b4b2ceb187
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -144,7 +144,7 @@ pub async fn sc(
id: Some(rid.to_raw()), id: Some(rid.to_raw()),
..Claims::default() ..Claims::default()
}; };
// Set the authentication on the sesssion // Set the authentication on the session
session.ns = Some(ns.to_owned()); session.ns = Some(ns.to_owned());
session.db = Some(db.to_owned()); session.db = Some(db.to_owned());
session.sc = Some(sc.to_owned()); session.sc = Some(sc.to_owned());
@ -206,7 +206,7 @@ pub async fn db(
id: Some(user), id: Some(user),
..Claims::default() ..Claims::default()
}; };
// Set the authentication on the sesssion // Set the authentication on the session
session.au = Arc::new(Auth::Db(ns, db)); session.au = Arc::new(Auth::Db(ns, db));
// Create the authentication token // Create the authentication token
match encode(&*HEADER, &val, &key) { match encode(&*HEADER, &val, &key) {
@ -255,7 +255,7 @@ pub async fn ns(
id: Some(user), id: Some(user),
..Claims::default() ..Claims::default()
}; };
// Set the authentication on the sesssion // Set the authentication on the session
session.au = Arc::new(Auth::Ns(ns)); session.au = Arc::new(Auth::Ns(ns));
// Create the authentication token // Create the authentication token
match encode(&*HEADER, &val, &key) { match encode(&*HEADER, &val, &key) {

View file

@ -79,7 +79,7 @@ pub async fn sc(
id: Some(rid.to_raw()), id: Some(rid.to_raw()),
..Claims::default() ..Claims::default()
}; };
// Set the authentication on the sesssion // Set the authentication on the session
session.ns = Some(ns.to_owned()); session.ns = Some(ns.to_owned());
session.db = Some(db.to_owned()); session.db = Some(db.to_owned());
session.sc = Some(sc.to_owned()); session.sc = Some(sc.to_owned());

View file

@ -13,7 +13,7 @@ async fn handler() -> Result<impl warp::Reply, warp::Rejection> {
match db.transaction(false, false).await { match db.transaction(false, false).await {
// The transaction failed to start // The transaction failed to start
Err(_) => Err(warp::reject::custom(Error::InvalidStorage)), Err(_) => Err(warp::reject::custom(Error::InvalidStorage)),
// The transaction was successfull // The transaction was successful
Ok(mut tx) => { Ok(mut tx) => {
// Cancel the transaction // Cancel the transaction
let _ = tx.cancel().await; let _ = tx.cancel().await;