From 26098ba6096a58bdaee20a1834590c108eee067c Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Mon, 11 Dec 2017 21:44:45 +0100 Subject: [PATCH] Bump version: 0.3.4 -> 0.3.5 (#286) --- CHANGELOG.md | 2 ++ Cargo.lock | 28 +++++++++++----------------- Cargo.toml | 2 +- justfile | 1 - src/assignment_evaluator.rs | 4 ++-- src/functions.rs | 14 +++++++++----- src/run.rs | 4 +++- 7 files changed, 28 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e64a2a..b443cea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [0.3.5] - 2017-12-11 ### Added - Align doc-comments in `--list` output (#273) - Add `arch()`, `os()`, and `os_family()` functions (#277) diff --git a/Cargo.lock b/Cargo.lock index 097b86b..b159034 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -48,7 +48,7 @@ dependencies = [ [[package]] name = "clap" -version = "2.28.0" +version = "2.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -98,7 +98,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "itertools" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -106,16 +106,16 @@ dependencies = [ [[package]] name = "just" -version = "0.3.4" +version = "0.3.5" dependencies = [ "ansi_term 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "assert_matches 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "brev 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.28.0 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)", "edit-distance 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "executable-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "itertools 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -133,11 +133,6 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "lazy_static" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "lazy_static" version = "1.0.0" @@ -186,7 +181,7 @@ dependencies = [ "aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -233,10 +228,10 @@ dependencies = [ [[package]] name = "thread_local" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -286,16 +281,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" "checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf" "checksum brev 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "d85c3b7957223c752ff78ffd20a1806b0c7262d9aef85ed470546f16b56a5bb2" -"checksum clap 2.28.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc34bf7d5d66268b466b9852bca925ec1d2650654dab4da081e63fd230145c2e" +"checksum clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)" = "110d43e343eb29f4f51c1db31beb879d546db27998577e5715270a54bcf41d3f" "checksum edit-distance 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6a34f5204fbc13582de418611cf3a7dcdd07c6d312a5b631597ba72c06b9d9c9" "checksum either 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "740178ddf48b1a9e878e6d6509a1442a2d42fd2928aae8e7a6f8a36fb01981b3" "checksum executable-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ebc5a6d89e3c90b84e8f33c8737933dda8f1c106b5415900b38b9d433841478" "checksum fuchsia-zircon 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f6c0581a4e363262e52b87f59ee2afe3415361c6ec35e665924eb08afe8ff159" "checksum fuchsia-zircon-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "43f3795b4bae048dc6123a6b972cadde2e676f9ded08aef6bb77f5f157684a82" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" -"checksum itertools 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "99f3f75d7cf195a7eedb0611efe8684b55c6c7264afe3d8bc00b704f061c0fdf" +"checksum itertools 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "947aa0b9bb417792efa3936c5dada2d680b3bc27ea6a88ffa062f4c4d86ef8c5" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" "checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d" "checksum libc 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)" = "36fbc8a8929c632868295d0178dd8f63fc423fd7537ad0738372bd010b3ac9b0" "checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" @@ -309,7 +303,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6" "checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" "checksum textwrap 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0b59b6b4b44d867f1370ef1bd91bfb262bf07bf0ae65c202ea2fbc16153b693" -"checksum thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1697c4b57aeeb7a536b647165a2825faddffb1d3bad386d507709bd51a90bb14" +"checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963" "checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" diff --git a/Cargo.toml b/Cargo.toml index c5030a8..a096989 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "just" -version = "0.3.4" +version = "0.3.5" description = "🤖 Just a command runner" authors = ["Casey Rodarmor "] license = "CC0-1.0" diff --git a/justfile b/justfile index f1baeb0..7cf99ea 100644 --- a/justfile +++ b/justfile @@ -38,7 +38,6 @@ publish: lint clippy test cargo publish git tag -a {{version}} -m 'Release {{version}}' git push github {{version}} - git push github # clean up feature branch BRANCH done BRANCH: diff --git a/src/assignment_evaluator.rs b/src/assignment_evaluator.rs index 33a5522..8ad1daa 100644 --- a/src/assignment_evaluator.rs +++ b/src/assignment_evaluator.rs @@ -101,9 +101,9 @@ impl<'a, 'b> AssignmentEvaluator<'a, 'b> { } Expression::Call{name, arguments: ref call_arguments, ref token} => { let call_arguments = call_arguments.iter().map(|argument| { - self.evaluate_expression(argument, &arguments) + self.evaluate_expression(argument, arguments) }).collect::, RuntimeError>>()?; - ::functions::evaluate_function(&token, name, &call_arguments) + ::functions::evaluate_function(token, name, &call_arguments) } Expression::String{ref cooked_string} => Ok(cooked_string.cooked.clone()), Expression::Backtick{raw, ref token} => { diff --git a/src/functions.rs b/src/functions.rs index 5b13e57..2678567 100644 --- a/src/functions.rs +++ b/src/functions.rs @@ -33,8 +33,8 @@ pub fn resolve_function<'a>(token: &Token<'a>, argc: usize) -> CompilationResult if let Some(function) = FUNCTIONS.get(&name) { use self::Function::*; match (function, argc) { - (&Nullary(_), 0) => Ok(()), - (&Unary(_), 1) => Ok(()), + (&Nullary(_), 0) | + (&Unary(_), 1) | (&Binary(_), 2) => Ok(()), _ => { Err(token.error(CompilationErrorKind::FunctionArgumentCountMismatch{ @@ -47,7 +47,11 @@ pub fn resolve_function<'a>(token: &Token<'a>, argc: usize) -> CompilationResult } } -pub fn evaluate_function<'a>(token: &Token<'a>, name: &'a str, arguments: &[String]) -> RunResult<'a, String> { +pub fn evaluate_function<'a>( + token: &Token<'a>, + name: &'a str, + arguments: &[String] +) -> RunResult<'a, String> { if let Some(function) = FUNCTIONS.get(name) { use self::Function::*; let argc = arguments.len(); @@ -83,7 +87,7 @@ pub fn os_family() -> Result { Ok(target::os_family().to_string()) } -pub fn env_var<'a>(key: &str) -> Result { +pub fn env_var(key: &str) -> Result { use std::env::VarError::*; match env::var(key) { Err(NotPresent) => Err(format!("environment variable `{}` not present", key)), @@ -93,7 +97,7 @@ pub fn env_var<'a>(key: &str) -> Result { } } -pub fn env_var_or_default<'a>(key: &str, default: &str) -> Result { +pub fn env_var_or_default(key: &str, default: &str) -> Result { use std::env::VarError::*; match env::var(key) { Err(NotPresent) => Ok(default.to_string()), diff --git a/src/run.rs b/src/run.rs index 806fac4..0684766 100644 --- a/src/run.rs +++ b/src/run.rs @@ -298,7 +298,9 @@ pub fn run() { if let Some(doc) = recipe.doc { print!( " {:padding$}{} {}", "", doc_color.paint("#"), doc_color.paint(doc), - padding = max_line_width.saturating_sub(line_widths.get(name).cloned().unwrap_or(max_line_width)) + padding = max_line_width.saturating_sub( + line_widths.get(name).cloned().unwrap_or(max_line_width) + ) ); } println!();