Quick fixes for eg-font-converter's generated BdfFonts (#34) #36
ci.yml
on: push
Run tests
1m 51s
Run parser tests
1m 42s
Check formatting
4s
Clippy
38s
Annotations
35 warnings
Check formatting
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Check formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Check formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
direct implementation of `ToString`:
eg-font-converter/src/lib.rs#L512
warning: direct implementation of `ToString`
--> eg-font-converter/src/lib.rs:512:1
|
512 | / impl ToString for Visibility {
513 | | fn to_string(&self) -> String {
514 | | match self {
515 | | Visibility::Private => "",
... |
523 | | }
524 | | }
| |_^
|
= help: prefer implementing `Display` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
= note: `#[warn(clippy::to_string_trait_impl)]` on by default
|
the borrowed expression implements the required traits:
eg-font-converter/src/lib.rs#L436
warning: the borrowed expression implements the required traits
--> eg-font-converter/src/lib.rs:436:31
|
436 | output_directory.join(&self.data_file())
| ^^^^^^^^^^^^^^^^^ help: change this to: `self.data_file()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
useless use of `format!`:
eg-font-converter/src/lib.rs#L273
warning: useless use of `format!`
--> eg-font-converter/src/lib.rs:273:60
|
273 | ParserBdfFont::parse(data).with_context(|| format!("couldn't parse BDF file"))?
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"couldn't parse BDF file".to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
|
useless use of `format!`:
eg-font-converter/src/lib.rs#L270
warning: useless use of `format!`
--> eg-font-converter/src/lib.rs:270:61
|
270 | ParserBdfFont::parse(&data).with_context(|| format!("couldn't parse BDF file"))?
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"couldn't parse BDF file".to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
= note: `#[warn(clippy::useless_format)]` on by default
|
the borrowed expression implements the required traits:
eg-font-converter/src/mono_font.rs#L193
warning: the borrowed expression implements the required traits
--> eg-font-converter/src/mono_font.rs:193:63
|
193 | fs::write(self.font.data_file_path(output_directory), &self.data())?;
| ^^^^^^^^^^^^ help: change this to: `self.data()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
eg-font-converter/src/mono_font.rs#L192
warning: the borrowed expression implements the required traits
--> eg-font-converter/src/mono_font.rs:192:63
|
192 | fs::write(self.font.rust_file_path(output_directory), &self.rust())?;
| ^^^^^^^^^^^^ help: change this to: `self.rust()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
manually reimplementing `div_ceil`:
eg-font-converter/src/mono_font.rs#L41
warning: manually reimplementing `div_ceil`
--> eg-font-converter/src/mono_font.rs:41:20
|
41 | let rows = (font.glyphs.len() + (glyphs_per_row - 1)) / glyphs_per_row;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `font.glyphs.len().div_ceil(glyphs_per_row)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil
= note: `#[warn(clippy::manual_div_ceil)]` on by default
|
the borrowed expression implements the required traits:
eg-font-converter/src/eg_bdf_font.rs#L142
warning: the borrowed expression implements the required traits
--> eg-font-converter/src/eg_bdf_font.rs:142:63
|
142 | fs::write(self.font.data_file_path(output_directory), &self.data())?;
| ^^^^^^^^^^^^ help: change this to: `self.data()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
eg-font-converter/src/eg_bdf_font.rs#L141
warning: the borrowed expression implements the required traits
--> eg-font-converter/src/eg_bdf_font.rs:141:63
|
141 | fs::write(self.font.rust_file_path(output_directory), &self.rust())?;
| ^^^^^^^^^^^^ help: change this to: `self.rust()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
needless `fn main` in doctest:
eg-font-converter/src/lib.rs#L18
warning: needless `fn main` in doctest
--> eg-font-converter/src/lib.rs:18:5
|
18 | //! use eg_font_converter::{FontConverter, Mapping};
| _____^
19 | | //!
20 | | //! fn main() {
21 | | //! let out_dir = std::env::var_os("OUT_DIR").unwrap();
... |
28 | | //! font_6x10.save(&out_dir).unwrap();
29 | | //! }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
= note: `#[warn(clippy::needless_doctest_main)]` on by default
|
direct implementation of `ToString`:
eg-font-converter/src/lib.rs#L512
warning: direct implementation of `ToString`
--> eg-font-converter/src/lib.rs:512:1
|
512 | / impl ToString for Visibility {
513 | | fn to_string(&self) -> String {
514 | | match self {
515 | | Visibility::Private => "",
... |
523 | | }
524 | | }
| |_^
|
= help: prefer implementing `Display` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
= note: `#[warn(clippy::to_string_trait_impl)]` on by default
|
the borrowed expression implements the required traits:
eg-font-converter/src/mono_font.rs#L193
warning: the borrowed expression implements the required traits
--> eg-font-converter/src/mono_font.rs:193:63
|
193 | fs::write(self.font.data_file_path(output_directory), &self.data())?;
| ^^^^^^^^^^^^ help: change this to: `self.data()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
use of `unwrap_or_else` to construct default value:
bdf-parser/src/properties.rs#L160
warning: use of `unwrap_or_else` to construct default value
--> bdf-parser/src/properties.rs:160:22
|
160 | .unwrap_or_else(HashMap::new);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
|
the borrowed expression implements the required traits:
eg-font-converter/src/mono_font.rs#L192
warning: the borrowed expression implements the required traits
--> eg-font-converter/src/mono_font.rs:192:63
|
192 | fs::write(self.font.rust_file_path(output_directory), &self.rust())?;
| ^^^^^^^^^^^^ help: change this to: `self.rust()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
manually reimplementing `div_ceil`:
eg-font-converter/src/mono_font.rs#L41
warning: manually reimplementing `div_ceil`
--> eg-font-converter/src/mono_font.rs:41:20
|
41 | let rows = (font.glyphs.len() + (glyphs_per_row - 1)) / glyphs_per_row;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `font.glyphs.len().div_ceil(glyphs_per_row)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil
= note: `#[warn(clippy::manual_div_ceil)]` on by default
|
the borrowed expression implements the required traits:
eg-font-converter/src/eg_bdf_font.rs#L142
warning: the borrowed expression implements the required traits
--> eg-font-converter/src/eg_bdf_font.rs:142:63
|
142 | fs::write(self.font.data_file_path(output_directory), &self.data())?;
| ^^^^^^^^^^^^ help: change this to: `self.data()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
eg-font-converter/src/eg_bdf_font.rs#L141
warning: the borrowed expression implements the required traits
--> eg-font-converter/src/eg_bdf_font.rs:141:63
|
141 | fs::write(self.font.rust_file_path(output_directory), &self.rust())?;
| ^^^^^^^^^^^^ help: change this to: `self.rust()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
needless `fn main` in doctest:
eg-font-converter/src/lib.rs#L18
warning: needless `fn main` in doctest
--> eg-font-converter/src/lib.rs:18:5
|
18 | //! use eg_font_converter::{FontConverter, Mapping};
| _____^
19 | | //!
20 | | //! fn main() {
21 | | //! let out_dir = std::env::var_os("OUT_DIR").unwrap();
... |
28 | | //! font_6x10.save(&out_dir).unwrap();
29 | | //! }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_doctest_main
= note: `#[warn(clippy::needless_doctest_main)]` on by default
|
use of `unwrap_or_else` to construct default value:
bdf-parser/src/properties.rs#L160
warning: use of `unwrap_or_else` to construct default value
--> bdf-parser/src/properties.rs:160:22
|
160 | .unwrap_or_else(HashMap::new);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
|
Clippy
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Clippy
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Run parser tests
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Run tests
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Run tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Run tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Run tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Run tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|