Commit 6b250581 authored by AdminXVII's avatar AdminXVII Committed by Michael Aaron Murphy

rust!: MSRV to 1.39.0

parent c8b43fe2
......@@ -5,7 +5,9 @@ variables:
before_script:
- apt-get update -qq
- apt-get install -qq build-essential curl git
format:
image: 'rustlang/rust:nightly'
cache:
paths:
- cargo/
......@@ -16,7 +18,7 @@ format:
- cargo +nightly fmt --all -- --check
linux:
image: 'rust:1.36.0'
image: 'rust:1.39.0'
cache:
paths:
- cargo/
......
prefix ?= usr/local
BINARY = $(prefix)/bin/ion
RELEASE = debug
TOOLCHAIN ?= 1.36.0
TOOLCHAIN ?= 1.39.0
GIT_REVISION=git_revision.txt
SRC=Cargo.toml Cargo.lock $(shell find src members -type f -wholename '*src/*.rs')
......
......@@ -45,7 +45,7 @@ See the [examples folder](https://gitlab.redox-os.org/redox-os/ion/tree/master/e
## Pop!\_OS / Ubuntu
The following PPA supports the 18.04 (bionic) and 19.04 (disco) releases. Bionic builds were made using the Pop\_OS PPA's rustc 1.36.0 package.
The following PPA supports the 18.04 (bionic) and 19.04 (disco) releases. Bionic builds were made using the Pop\_OS PPA's rustc 1.39.0 package.
```
sudo add-apt-repository ppa:mmstick76/ion-shell
......@@ -54,13 +54,13 @@ sudo add-apt-repository ppa:mmstick76/ion-shell
# Developer set up
Those who are developing software with Rust should install the [Rustup toolchain manager](https://rustup.rs/).
After installing rustup, run `rustup override set 1.36.0` to set your Rust toolchain to the version that Ion is
After installing rustup, run `rustup override set 1.39.0` to set your Rust toolchain to the version that Ion is
targeting at the moment. To build for Redox OS, `rustup override set nightly` is required to build the Redox
dependencies.
# Build dependencies
Please ensure that both cargo and rustc 1.36.0 or higher is installed for your system.
Please ensure that both cargo and rustc 1.39.0 or higher is installed for your system.
Release tarballs have not been made yet due to Ion being incomplete in a few remaining areas.
# Compile instructions for distribution
......
......@@ -112,11 +112,8 @@ impl<'a> InteractiveShell<'a> {
// pipline just executed to the the file and context histories. At the
// moment, this means record how long it took.
if Some("1".into()) == shell.variables().get_str("RECORD_SUMMARY").ok() {
let summary = format!(
"#summary# elapsed real time: {}.{:09} seconds",
elapsed.as_secs(),
elapsed.subsec_nanos()
);
let summary =
format!("#summary# elapsed real time: {:.9} seconds", elapsed.as_secs_f32(),);
println!("{}", summary);
context.borrow_mut().history.push(summary.into()).unwrap_or_else(|err| {
eprintln!("ion: history append: {}", err);
......
......@@ -405,13 +405,14 @@ impl<'a> Shell<'a> {
let condition = self.execute_statement(box_statement)?;
let duration = time.elapsed();
let seconds = duration.as_secs();
let nanoseconds = duration.subsec_nanos();
let duration = duration.as_secs_f32();
let seconds = duration.rem_euclid(60.);
let minutes = duration.div_euclid(60.);
if seconds > 60 {
println!("real {}m{:02}.{:09}s", seconds / 60, seconds % 60, nanoseconds);
if minutes != 0. {
println!("real {}m{:.9}s", minutes, seconds);
} else {
println!("real {}.{:09}s", seconds, nanoseconds);
println!("real {:.9}s", seconds);
}
if condition != Condition::NoOp {
return Ok(condition);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment