diff --git a/lib/src/ctx/context.rs b/lib/src/ctx/context.rs index 4049f24e..b30fc96e 100644 --- a/lib/src/ctx/context.rs +++ b/lib/src/ctx/context.rs @@ -25,7 +25,7 @@ pub struct Context<'a> { parent: Option<&'a Context<'a>>, // An optional deadline. deadline: Option, - // Wether or not this context is cancelled. + // Whether or not this context is cancelled. cancelled: Arc, // A collection of read only values stored in this context. values: Option>>, @@ -58,7 +58,7 @@ impl<'a> Context<'a> { } } - // Add cancelation to the context. The value that is returned will cancel + // Add cancellation to the context. The value that is returned will cancel // the context and it's children once called. pub fn add_cancel(&mut self) -> Canceller { let cancelled = self.cancelled.clone(); diff --git a/lib/src/fnc/script/error.rs b/lib/src/fnc/script/error.rs index 6ed09c67..8c208e84 100644 --- a/lib/src/fnc/script/error.rs +++ b/lib/src/fnc/script/error.rs @@ -10,7 +10,7 @@ impl From for Error { line, } => Error::InvalidScript { message: format!( - "An exception occured{}: {}{}", + "An exception occurred{}: {}{}", match file.is_empty() { false => format!(" at {}:{}", file, line), true => String::default(), @@ -26,7 +26,7 @@ impl From for Error { ), }, js::Error::Unknown => Error::InvalidScript { - message: "An unknown error occured".to_string(), + message: "An unknown error occurred".to_string(), }, _ => Error::InvalidScript { message: e.to_string(), diff --git a/lib/src/kvs/ds.rs b/lib/src/kvs/ds.rs index ca33d667..b94a6038 100644 --- a/lib/src/kvs/ds.rs +++ b/lib/src/kvs/ds.rs @@ -286,7 +286,7 @@ impl Datastore { let mut txn = self.transaction(false, false).await?; // Process the export txn.export(&ns, &db, chn).await?; - // Everythign ok + // Everything ok Ok(()) } } diff --git a/lib/src/kvs/tx.rs b/lib/src/kvs/tx.rs index 5a52e531..e4b790a5 100644 --- a/lib/src/kvs/tx.rs +++ b/lib/src/kvs/tx.rs @@ -1286,7 +1286,7 @@ impl Transaction { chn.send(bytes!("")).await?; } } - // Output INDEXS + // Output INDEXES let ixs = self.all_ix(ns, db, &tb.name).await?; if !ixs.is_empty() { for ix in ixs.iter() { diff --git a/lib/src/sql/param.rs b/lib/src/sql/param.rs index 738bc2a9..b0e80103 100644 --- a/lib/src/sql/param.rs +++ b/lib/src/sql/param.rs @@ -47,7 +47,7 @@ impl Param { Some(v) => { // Get the path parts let pth: &[Part] = self; - // Process the paramater value + // Process the parameter value let res = v.compute(ctx, opt, txn, doc).await?; // Return the desired field res.get(ctx, opt, txn, pth.next()).await @@ -60,7 +60,7 @@ impl Param { Some(v) => { // Get the path parts let pth: &[Part] = self; - // Process the paramater value + // Process the parameter value let res = v.compute(ctx, opt, txn, doc).await?; // Return the desired field res.get(ctx, opt, txn, pth.next()).await diff --git a/lib/src/sql/statements/info.rs b/lib/src/sql/statements/info.rs index 7ff55981..0cc17d23 100644 --- a/lib/src/sql/statements/info.rs +++ b/lib/src/sql/statements/info.rs @@ -166,7 +166,7 @@ impl InfoStatement { tmp.insert(v.name.to_string(), v.to_string().into()); } res.insert("fd".to_owned(), tmp.into()); - // Process the indexs + // Process the indexes let mut tmp = Object::default(); for v in run.all_ix(opt.ns(), opt.db(), tb).await?.iter() { tmp.insert(v.name.to_string(), v.to_string().into()); diff --git a/src/cli/mod.rs b/src/cli/mod.rs index 777a1e48..908c7ded 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -53,7 +53,7 @@ fn path_valid(v: &str) -> Result<(), String> { } Err(String::from( "\ - Provide a valid database path paramater\ + Provide a valid database path parameter\ ", )) } diff --git a/src/iam/signin.rs b/src/iam/signin.rs index 745f7b4c..c8b4295e 100644 --- a/src/iam/signin.rs +++ b/src/iam/signin.rs @@ -11,11 +11,11 @@ use surrealdb::sql::Object; use surrealdb::Session; pub async fn signin(vars: Object) -> Result { - // Parse the speficied variables + // Parse the specified variables let ns = vars.get("NS").or_else(|| vars.get("ns")); let db = vars.get("DB").or_else(|| vars.get("db")); let sc = vars.get("SC").or_else(|| vars.get("sc")); - // Check if the paramaters exist + // Check if the parameters exist match (ns, db, sc) { (Some(ns), Some(db), Some(sc)) => { // Process the provided values diff --git a/src/iam/signup.rs b/src/iam/signup.rs index 87a0bf66..722e3363 100644 --- a/src/iam/signup.rs +++ b/src/iam/signup.rs @@ -9,11 +9,11 @@ use surrealdb::sql::Object; use surrealdb::Session; pub async fn signup(vars: Object) -> Result { - // Parse the speficied variables + // Parse the specified variables let ns = vars.get("NS").or_else(|| vars.get("ns")); let db = vars.get("DB").or_else(|| vars.get("db")); let sc = vars.get("SC").or_else(|| vars.get("sc")); - // Check if the paramaters exist + // Check if the parameters exist match (ns, db, sc) { (Some(ns), Some(db), Some(sc)) => { // Process the provided values diff --git a/src/net/rpc.rs b/src/net/rpc.rs index d1c8e6ad..a994eb7e 100644 --- a/src/net/rpc.rs +++ b/src/net/rpc.rs @@ -275,7 +275,7 @@ impl Rpc { let opt = CF.get().unwrap(); // Specify the SQL query string let sql = "KILL $id"; - // Specify the query paramaters + // Specify the query parameters let var = Some(map! { String::from("id") => id, => &self.vars @@ -295,7 +295,7 @@ impl Rpc { let opt = CF.get().unwrap(); // Specify the SQL query string let sql = "LIVE SELECT * FROM $tb"; - // Specify the query paramaters + // Specify the query parameters let var = Some(map! { String::from("tb") => tb.make_table(), => &self.vars @@ -317,7 +317,7 @@ impl Rpc { let kvs = DB.get().unwrap(); // Get local copy of options let opt = CF.get().unwrap(); - // Specify the query paramaters + // Specify the query parameters let var = Some(self.vars.clone()); // Execute the query on the database let res = kvs.execute(&sql, &self.session, var, opt.strict).await?; @@ -332,7 +332,7 @@ impl Rpc { let kvs = DB.get().unwrap(); // Get local copy of options let opt = CF.get().unwrap(); - // Specify the query paramaters + // Specify the query parameters let var = Some(mrg! { vars.0, &self.vars }); // Execute the query on the database let res = kvs.execute(&sql, &self.session, var, opt.strict).await?; @@ -353,7 +353,7 @@ impl Rpc { let opt = CF.get().unwrap(); // Specify the SQL query string let sql = "SELECT * FROM $what"; - // Specify the query paramaters + // Specify the query parameters let var = Some(map! { String::from("what") => what.make_table_or_thing(), => &self.vars @@ -377,7 +377,7 @@ impl Rpc { let opt = CF.get().unwrap(); // Specify the SQL query string let sql = "CREATE $what CONTENT $data RETURN AFTER"; - // Specify the query paramaters + // Specify the query parameters let var = Some(map! { String::from("what") => what.make_table_or_thing(), String::from("data") => data.into().into(), @@ -402,7 +402,7 @@ impl Rpc { let opt = CF.get().unwrap(); // Specify the SQL query string let sql = "UPDATE $what CONTENT $data RETURN AFTER"; - // Specify the query paramaters + // Specify the query parameters let var = Some(map! { String::from("what") => what.make_table_or_thing(), String::from("data") => data.into().into(), @@ -427,7 +427,7 @@ impl Rpc { let opt = CF.get().unwrap(); // Specify the SQL query string let sql = "UPDATE $what MERGE $data RETURN AFTER"; - // Specify the query paramaters + // Specify the query parameters let var = Some(map! { String::from("what") => what.make_table_or_thing(), String::from("data") => data.into().into(), @@ -452,7 +452,7 @@ impl Rpc { let opt = CF.get().unwrap(); // Specify the SQL query string let sql = "UPDATE $what PATCH $data RETURN DIFF"; - // Specify the query paramaters + // Specify the query parameters let var = Some(map! { String::from("what") => what.make_table_or_thing(), String::from("data") => data.into().into(), @@ -477,7 +477,7 @@ impl Rpc { let opt = CF.get().unwrap(); // Specify the SQL query string let sql = "DELETE $what"; - // Specify the query paramaters + // Specify the query parameters let var = Some(map! { String::from("what") => what.make_table_or_thing(), => &self.vars