Skip to content

Commit

Permalink
[0.15.12] Ensure backwards-compatibility to rust version 1.37.0
Browse files Browse the repository at this point in the history
	- fixes #60
  • Loading branch information
emabee committed Aug 28, 2020
1 parent 065e2ac commit 5d85cd9
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 24 deletions.
33 changes: 19 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
language: rust

rust:
- stable
- beta
- nightly
matrix:
allow_failures:
- rust: nightly
- os: windows
fast_finish: true
# - 1.37.0 // does not work since cargo test is executed automatically

os:
- linux
- windows
- osx

cache: cargo
jobs:
fast_finish: true
allow_failures:
- rust: nightly
- os: windows
include:
- if: rust = stable OR rust = beta OR rust = nightly
script:
- cargo test --release --all-features
- cargo doc --all-features --no-deps
- cargo test --release
- cargo test --release --no-default-features

script:
- cargo build
- cargo build --all-features
- cargo build --release
- cargo build --release --all-features
- cargo test --release --all-features
- cargo test
- cargo doc --all-features --no-deps
- if: rust = "1.37.0"
script:
- cargo build --release
- cargo build --release --no-default-features
- cargo build --release --all-feature
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.15.12] - 2020-08-07

Make `1.37.0` the minimal rust version for `flexi_logger`.

## [0.15.11] - 2020-08-07

Introduce feature `specfile_without_notification` to allow coping with OS issues
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "flexi_logger"
version = "0.15.11"
version = "0.15.12"
authors = ["emabee <meinolf.block@sap.com>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand Down
11 changes: 4 additions & 7 deletions scripts/qualify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ fn main() {
run_command!("cargo", "build");
run_command!("cargo", "build", "--no-default-features");
run_command!("cargo", "build", "--all-features");
run_command!("cargo", "+1.37.0", "build", "--no-default-features");
run_command!("cargo", "+1.37.0", "build", "--all-features");
run_command!("cargo", "build", "--release");
run_command!("cargo", "build", "--release", "--all-features");

Expand All @@ -58,13 +60,8 @@ fn main() {
run_command!("cargo", "test", "--release", "--all-features");
run_command!("cargo", "test", "--no-default-features");
run_command!("cargo", "test", "--release");
run_command!(
"cargo",
"test",
"--release",
"--features",
"specfile_without_notification"
);
#[rustfmt::skip]
run_command!("cargo", "test", "--release", "--features", "specfile_without_notification");
run_script("cleanup");

// doc
Expand Down
7 changes: 5 additions & 2 deletions src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,11 @@ impl Logger {
fn tty_format(_out: bool) -> FormatFunction {
#[cfg(feature = "colors")]
#[allow(clippy::used_underscore_binding)]
if (_out && atty::is(atty::Stream::Stdout)) || (!_out && atty::is(atty::Stream::Stderr)) {
return formats::colored_default_format;
{
if (_out && atty::is(atty::Stream::Stdout)) || (!_out && atty::is(atty::Stream::Stderr))
{
return formats::colored_default_format;
}
}
formats::default_format
}
Expand Down
Binary file removed testfile
Binary file not shown.
Binary file removed testfile2
Binary file not shown.

0 comments on commit 5d85cd9

Please sign in to comment.