Skip to content

Fix doc link and make CI lints stricter #272

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

Merged
merged 5 commits into from
Aug 23, 2021
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
12 changes: 10 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
CARGO_PROFILE_DEV_PANIC: unwind
with:
command: test
args: -Zbuild-std=std --target x86_64-unknown-linux-gnu
args: -Zbuild-std=std --target x86_64-unknown-linux-gnu --features=exts

lints:
name: Lints
Expand All @@ -112,4 +112,12 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: clippy
args: --target x86_64-unknown-uefi
args: --target x86_64-unknown-uefi --all-features -- -Dwarnings

- name: Run cargo doc
uses: actions-rs/cargo@v1
env:
RUSTDOCFLAGS: -Dwarnings
with:
command: doc
args: --target x86_64-unknown-uefi --all-features
4 changes: 3 additions & 1 deletion src/data_types/strs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ impl CStr16 {

/// Writes each [`Char16`] as a [´char´] (4 bytes long in Rust language) into the buffer.
/// It is up the the implementer of [`core::fmt::Write`] to convert the char to a string
/// with proper encoding/charset. For example, in the case of [`core::alloc::string::String`]
/// with proper encoding/charset. For example, in the case of [`alloc::string::String`]
/// all Rust chars (UTF-32) get converted to UTF-8.
///
/// ## Example
Expand All @@ -179,6 +179,8 @@ impl CStr16 {
/// firmware_vendor_c16_str.as_str_in_buf(&mut buf);
/// log::info!("as rust str: {}", buf.as_str());
/// ```
///
/// [`alloc::string::String`]: https://doc.rust-lang.org/nightly/alloc/string/struct.String.html
pub fn as_str_in_buf(&self, buf: &mut dyn core::fmt::Write) -> core::fmt::Result {
for c16 in self.iter() {
buf.write_char(char::from(*c16))?;
Expand Down