Skip to content

Commit

Permalink
Fix typos (#1501)
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvdb authored Sep 24, 2024
1 parent 6a72fc6 commit ced0c3e
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Report bugs in the [GitHub issue tracker][bugs].

Please use the template, which should remind you to include:

* A clear and consise description of the bug
* A clear and concise description of the bug
* Detailed steps to reproduce the bug
* Expected behavior
* Screenshots, where appropriate
Expand Down
16 changes: 8 additions & 8 deletions cli/src/auth/oidc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,20 @@ impl CodeVerifier {
}

impl From<CodeVerifier> for String {
fn from(code_verfier: CodeVerifier) -> Self {
code_verfier.0
fn from(code_verifier: CodeVerifier) -> Self {
code_verifier.0
}
}

impl From<&CodeVerifier> for String {
fn from(code_verfier: &CodeVerifier) -> Self {
code_verfier.0.clone()
fn from(code_verifier: &CodeVerifier) -> Self {
code_verifier.0.clone()
}
}

impl<'a> From<&'a CodeVerifier> for &'a str {
fn from(code_verfier: &'a CodeVerifier) -> Self {
&code_verfier.0
fn from(code_verifier: &'a CodeVerifier) -> Self {
&code_verifier.0
}
}

Expand Down Expand Up @@ -213,14 +213,14 @@ pub async fn fetch_locksmith_server_settings(
fn build_grant_type_auth_code_post_body(
redirect_url: &Url,
authorization_code: &AuthorizationCode,
code_verfier: &CodeVerifier,
code_verifier: &CodeVerifier,
token_name: Option<String>,
expiry: Option<DateTime<Utc>>,
) -> Result<HashMap<String, String>> {
let mut body = hashmap! {
"client_id".to_owned() => Default::default(),
"code".to_owned() => authorization_code.into(),
"code_verifier".to_owned() => code_verfier.into(),
"code_verifier".to_owned() => code_verifier.into(),
"grant_type".to_owned() => "authorization_code".to_owned(),
// Must match previous request to /authorize but not redirected to by server
"redirect_uri".to_owned() => redirect_url.to_string(),
Expand Down
2 changes: 1 addition & 1 deletion cli/src/auth/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async fn spawn_server_and_get_auth_code(
let is_routable = check_if_routable(format!("{auth_host}:{port}"))?;
if is_routable && auth_scheme == "http" {
return Err(anyhow!(
"Authorization host {auth_host} is publically routable, must use https to connect."
"Authorization host {auth_host} is publicly routable, must use https to connect."
));
}

Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ pub async fn handle_auth(
match matches.subcommand() {
Some(("register", _)) => match handle_auth_register(config, matches).await {
Ok(_) => {
print_user_success!("{}", "User successfuly regsistered");
print_user_success!("{}", "User successfully regsistered");
Ok(ExitCode::Ok)
},
Err(error) => Err(error).context("User registration failed"),
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ fn prompt_depfiles(

/// Ask for the dependency file names.
fn prompt_depfile_names() -> io::Result<Vec<String>> {
// Find all known dependency files below the currenty directory.
// Find all known dependency files below the current directory.
let mut depfiles = phylum_lockfile::find_depfiles_at(".")
.iter()
.flat_map(|(path, _)| Some(path.to_str()?.to_owned()))
Expand Down
2 changes: 1 addition & 1 deletion cli/src/commands/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ async fn handle_update_project(
Ok(ExitCode::Ok)
}

/// Link a Phylum project to the currenty directory.
/// Link a Phylum project to the current directory.
async fn handle_link_project(
api: &PhylumApi,
matches: &ArgMatches,
Expand Down
2 changes: 1 addition & 1 deletion cli/src/permissions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ pub fn default_sandbox() -> SandboxResult<Birdcage> {
Ok(birdcage)
}

/// Add an execption to the sandbox, ignoring invalid path errors.
/// Add an exception to the sandbox, ignoring invalid path errors.
#[cfg(unix)]
pub fn add_exception(birdcage: &mut Birdcage, exception: Exception) -> SandboxResult<()> {
match birdcage.add_exception(exception) {
Expand Down
2 changes: 1 addition & 1 deletion cli/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ pub mod open {
Handle::current().spawn(async move {
let url = Url::from_str(&authorization_url).expect("Failed to parse url.");

let code = "FAKE_OAUTH_ATHORIZATION_CODE";
let code = "FAKE_OAUTH_AUTHORIZATION_CODE";

let query_params = url.query_pairs().into_owned().collect::<HashMap<String, String>>();
let state =
Expand Down
2 changes: 1 addition & 1 deletion cli/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ pub struct ProjectListEntry {

#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Debug, Serialize, Deserialize)]
pub struct Paginated<T> {
/// The curent page of values.
/// The current page of values.
pub values: Vec<T>,
/// Indication of whether the current query has more values past the last
/// element in `values`.
Expand Down
2 changes: 1 addition & 1 deletion doc_templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ template used when no override is present.
Some placeholders are available to templates, these will be replaced
automatically with their values during documentation generation.

These placeholers are currently supported:
These placeholders are currently supported:

| Name | Description |
| ---------------- | -------------------------------------------------------------------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion extensions/cargo/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function findRoot(manifest: string): Promise<string | undefined> {

/// Check if there is a cache entry for this lockfile's hash.
async function hasSuccessCached(lockfilePath: string): Promise<boolean> {
// Check if sucess is cached.
// Check if success is cached.
const hash = await hashFile(lockfilePath);

try {
Expand Down
2 changes: 1 addition & 1 deletion lockfile/src/javascript.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl Parse for YarnLock {

// Extract original resolver from patch.
if let Some((_, patch)) = resolver.split_once("patch:") {
// Exctract resolver from `@scope/package@RESOLVER#patch`.
// Extract resolver from `@scope/package@RESOLVER#patch`.
let patch = patch[1..].split_once('@');
let subresolver = patch.and_then(|(_, resolver)| resolver.split_once('#'));
resolver = match subresolver {
Expand Down
2 changes: 1 addition & 1 deletion lockfile/src/parsers/go_mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pub fn parse(input: &str) -> IResult<&str, GoDeps> {
},
}

// Add the replacment module.
// Add the replacement module.
packages.push(Package::from(replacement));
}

Expand Down
2 changes: 1 addition & 1 deletion lockfile/src/spdx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::{
pub(crate) struct SpdxInfo {
#[serde(rename = "SPDXID")]
pub(crate) spdx_id: String,
// Deprecated in v2.3 but kept for v2.2 compatability.
// Deprecated in v2.3 but kept for v2.2 compatibility.
#[serde(default)]
pub(crate) document_describes: Vec<String>,
pub(crate) packages: Vec<PackageInformation>,
Expand Down

0 comments on commit ced0c3e

Please sign in to comment.