Make readability fixes to Rust code comments (#157)
This commit is contained in:
parent
8403238dbb
commit
b4b2ceb187
3 changed files with 5 additions and 5 deletions
|
@ -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) {
|
||||||
|
|
|
@ -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());
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue