aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-06-05 22:42:55 +0000
committerFuwn <[email protected]>2021-06-05 22:42:55 +0000
commit47c185c5973b7095b3df0b1ff79a3c51bb6fbc4e (patch)
treebe34623c8623a6f134108e74c763e5403639239a
parentfeat(make): document generation task (diff)
downloadwhirl-47c185c5973b7095b3df0b1ff79a3c51bb6fbc4e.tar.xz
whirl-47c185c5973b7095b3df0b1ff79a3c51bb6fbc4e.zip
build(global): bump toolchain release
This commit also fixes all of the new lints that arose because of the bump.
-rw-r--r--.github/workflows/rust.yml2
-rw-r--r--crates/whirl_prompt/src/builtins/mod.rs2
-rw-r--r--crates/whirl_prompt/src/lib.rs8
-rw-r--r--crates/whirl_server/src/cmd/constants.rs4
-rw-r--r--nix/rust.nix2
-rw-r--r--rust-toolchain.toml2
6 files changed, 10 insertions, 10 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 5ada3b2..1c5f1f5 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -22,7 +22,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
- toolchain: nightly-2021-02-20
+ toolchain: nightly-2021-06-04
components: rustfmt, clippy
override: true
diff --git a/crates/whirl_prompt/src/builtins/mod.rs b/crates/whirl_prompt/src/builtins/mod.rs
index 2bebd31..655f507 100644
--- a/crates/whirl_prompt/src/builtins/mod.rs
+++ b/crates/whirl_prompt/src/builtins/mod.rs
@@ -39,7 +39,7 @@ pub fn builtin_ls() -> i32 {
0
}
-pub async fn builtin_cat(args: &[String]) -> i32 {
+pub fn builtin_cat(args: &[String]) -> i32 {
let file;
if let Some(file_name) = args.get(0) {
file = file_name.to_string();
diff --git a/crates/whirl_prompt/src/lib.rs b/crates/whirl_prompt/src/lib.rs
index a7b2389..4b82b83 100644
--- a/crates/whirl_prompt/src/lib.rs
+++ b/crates/whirl_prompt/src/lib.rs
@@ -55,9 +55,7 @@ impl Prompt {
loop {
Self::write_prompt();
let command = Self::read_command();
- prompt
- .process_command(Self::tokenize_command(&command))
- .await;
+ prompt.process_command(&Self::tokenize_command(&command));
}
}
@@ -93,7 +91,7 @@ impl Prompt {
// TODO: Find a way to make this access itself `history` doesn't have to be
// passed everytime.
- async fn process_command(&mut self, c: Command) -> i32 {
+ fn process_command(&mut self, c: &Command) -> i32 {
let exit_code = match BuiltIn::from_str(&c.keyword) {
Ok(BuiltIn::Echo) => builtin_echo(&c.args),
Ok(BuiltIn::Exit) => std::process::exit(0),
@@ -101,7 +99,7 @@ impl Prompt {
Ok(BuiltIn::Null) => 0,
Ok(BuiltIn::Help) => builtin_help(),
Ok(BuiltIn::Ls) => builtin_ls(),
- Ok(BuiltIn::Cat) => builtin_cat(&c.args).await,
+ Ok(BuiltIn::Cat) => builtin_cat(&c.args),
Ok(BuiltIn::Config) => builtin_config(&c.args),
Ok(BuiltIn::Fetch) => builtin_fetch(),
_ => {
diff --git a/crates/whirl_server/src/cmd/constants.rs b/crates/whirl_server/src/cmd/constants.rs
index fc3f246..41986bb 100644
--- a/crates/whirl_server/src/cmd/constants.rs
+++ b/crates/whirl_server/src/cmd/constants.rs
@@ -1,7 +1,9 @@
// Copyleft (ɔ) 2021-2021 The Whirlsplash Collective
// SPDX-License-Identifier: GPL-3.0-only
-#![allow(dead_code)]
+// Have to use this until https://github.com/rust-num/num-derive/issues/47 gets
+// fixed.
+#![allow(clippy::use_self)]
#[derive(num_derive::FromPrimitive)]
pub enum Command {
diff --git a/nix/rust.nix b/nix/rust.nix
index 81ca0e8..0a43f57 100644
--- a/nix/rust.nix
+++ b/nix/rust.nix
@@ -3,7 +3,7 @@
let
pkgs = import sources.nixpkgs { overlays = [ (import sources.nixpkgs-mozilla) ]; };
channel = "nightly";
- date = "2021-02-20";
+ date = "2021-06-04";
targets = [ ];
chan = pkgs.rustChannelOfTargets channel date targets;
in chan
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
index f2262e1..f0aa3cc 100644
--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2021-02-20"
+channel = "nightly-2021-06-04"