Skip to content

Commit

Permalink
build: Upgrade to Rust 1.70 and fix new clippy warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Gil <[email protected]>
  • Loading branch information
pando85 committed Jun 27, 2023
1 parent 8bebd07 commit ea8324a
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ members = [
[workspace.package]
version = "1.8.6"
authors = ["Pando85 <[email protected]>"]
rust-version = "1.67"
rust-version = "1.70"
edition = "2021"
license-file = "LICENSE"
homepage = "https://rash.sh"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=rust:1.67.0
ARG BASE_IMAGE=rust:1.70.0
FROM ${BASE_IMAGE} AS builder
LABEL mantainer [email protected]

Expand Down
1 change: 0 additions & 1 deletion rash_core/src/docopt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ pub fn parse(file: &str, args: &[&str]) -> Result<Vars> {
fn parse_help(file: &str) -> String {
let re = Regex::new(r"#(.*)").unwrap();
file.split('\n')
.into_iter()
// skip first empty line cause split
.skip(1)
.map_while(|line| re.captures(line))
Expand Down
1 change: 0 additions & 1 deletion rash_core/src/docopt/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ impl Options {
pub fn parse_doc(doc: &str, usages: &[String]) -> Result<Self> {
let mut description_options = Options::new(
doc.split('\n')
.into_iter()
.filter_map(|line| {
let trimmed = line.trim_start();
if trimmed.starts_with('-') {
Expand Down
9 changes: 2 additions & 7 deletions rash_core/src/modules/find.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,15 @@ use strum_macros::{Display, EnumString};
#[derive(Debug, PartialEq, Deserialize)]
#[cfg_attr(feature = "docs", derive(EnumString, Display, JsonSchema))]
#[serde(rename_all = "lowercase")]
#[derive(Default)]
enum FileType {
Any,
Directory,
#[default]
File,
Link,
}

impl Default for FileType {
fn default() -> Self {
FileType::File
}
}

fn default_file_type() -> Option<FileType> {
Some(FileType::default())
}
Expand Down Expand Up @@ -206,7 +202,6 @@ fn find(params: Params) -> Result<ModuleResult> {
.git_ignore(!params.hidden.unwrap())
.git_exclude(!params.hidden.unwrap())
.build()
.into_iter()
.map(|dir_entry| dir_entry.map_err(|e| Error::new(ErrorKind::Other, e)))
.collect::<Result<Vec<_>>>()?
.into_iter()
Expand Down

0 comments on commit ea8324a

Please sign in to comment.