Skip to content
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
17 changes: 13 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Install Rust (rustup)
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
run: |
rustup update ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
if: matrix.os != 'macos-latest'
- name: Install Rust (macos)
run: |
Expand All @@ -55,7 +57,10 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable && rustup default stable && rustup component add rustfmt
run: |
rustup update stable
rustup default stable
rustup component add rustfmt
- run: cargo fmt -- --check

msrv:
Expand All @@ -64,7 +69,9 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update 1.16.0 && rustup default 1.16.0
run: |
rustup update 1.31.0
rustup default 1.31.0
- run: cargo build --verbose
- run: cargo build --verbose --features serde
- run: cargo build --verbose --features std
Expand All @@ -75,6 +82,8 @@ jobs:
steps:
- uses: actions/checkout@master
- name: Install Rust
run: rustup update stable && rustup default stable
run: |
rustup update stable
rustup default stable
- run: rustup target add thumbv6m-none-eabi
- run: cargo build --verbose --target=thumbv6m-none-eabi
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ implementation that is most suitable for its use case.

## Minimum supported `rustc`

`1.16.0+`
`1.31.0+`

This version is explicitly tested in CI and may be bumped in any release as needed. Maintaining compatibility with older compilers is a priority though, so the bar for bumping the minimum supported version is set very high. Any changes to the supported minimum version will be called out in the release notes.

Expand Down
17 changes: 3 additions & 14 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -911,28 +911,17 @@ impl<'a> RecordBuilder<'a> {
/// [`Metadata::builder().build()`]: struct.MetadataBuilder.html#method.build
#[inline]
pub fn new() -> RecordBuilder<'a> {
#[cfg(feature = "kv_unstable")]
return RecordBuilder {
RecordBuilder {
record: Record {
args: format_args!(""),
metadata: Metadata::builder().build(),
module_path: None,
file: None,
line: None,
#[cfg(feature = "kv_unstable")]
key_values: KeyValues(&Option::None::<(kv::Key, kv::Value)>),
},
};

#[cfg(not(feature = "kv_unstable"))]
return RecordBuilder {
record: Record {
args: format_args!(""),
metadata: Metadata::builder().build(),
module_path: None,
file: None,
line: None,
},
};
}
}

/// Set [`args`](struct.Record.html#method.args).
Expand Down