Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various typos #1507

Merged
merged 2 commits into from
Sep 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/typos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI
on:
pull_request:
push:
branches:
- "master"
jobs:
typos:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v3
- name: Check spelling
uses: crate-ci/typos@master
8 changes: 8 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[files]
extend-exclude = ["*.svg"]

[default.extend-words]
# Ignore false-positives
gir = "gir"
inout = "inout"
serde = "serde"
2 changes: 1 addition & 1 deletion book/src/config/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ name = "Gst.Format"
status = "generate"
[[object.derive]]
name = "Serialize, Deserialize"
cfg_condition = "feature = \"ser_de\""
cfg_condition = "feature = \"serde\""
```

For global functions, the members can be configured by configuring the `Gtk.*` object:
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ fn analyze_callbacks(
rust_type,
None,
) {
// We just assume that for API "cleaness", the destroy callback will always
// We just assume that for API "cleanness", the destroy callback will always
// be |-> *after* <-| the initial callback.
if let Some(user_data_index) = cross_user_data_check.get(&pos) {
callback.user_data_index = *user_data_index;
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/out_parameters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ pub fn use_function_return_for_result(
func_name: &str,
configured_functions: &[&config::functions::Function],
) -> bool {
// Configuration takes precendence over everything.
// Configuration takes precedence over everything.
let use_return_for_result = configured_functions
.iter()
.find_map(|f| f.ret.use_return_for_result.as_ref());
Expand Down
4 changes: 2 additions & 2 deletions src/analysis/override_string_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fn apply(env: &Env, type_id: TypeId, string_type: Option<config::StringType>) ->
};
match *env.library.type_(type_id) {
Type::Basic(Basic::Filename | Basic::OsString | Basic::Utf8) => replace,
Type::CArray(inner_tid) if can_overriden_basic(env, inner_tid) => {
Type::CArray(inner_tid) if can_overridden_basic(env, inner_tid) => {
Type::find_c_array(&env.library, replace, None)
}
_ => {
Expand All @@ -50,7 +50,7 @@ fn apply(env: &Env, type_id: TypeId, string_type: Option<config::StringType>) ->
}
}

fn can_overriden_basic(env: &Env, type_id: TypeId) -> bool {
fn can_overridden_basic(env: &Env, type_id: TypeId) -> bool {
matches!(
*env.library.type_(type_id),
Type::Basic(Basic::Filename | Basic::OsString | Basic::Utf8)
Expand Down
2 changes: 1 addition & 1 deletion src/nameutil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub fn file_name_sys(name: &str) -> String {
path.to_str().unwrap().into()
}

/// Crate name with undescores for `use` statement
/// Crate name with underscores for `use` statement
pub fn crate_name(name: &str) -> String {
let name = name.replace('-', "_").to_snake();
let crate_name = if let Some(name_without_prefix) = name.strip_prefix("g_") {
Expand Down
Loading