Skip to content

Commit 0c0e030

Browse files
committed
Cleaned up useless Result
1 parent d1b7b46 commit 0c0e030

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/cli.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use std::{env, path::PathBuf};
22

33
use crate::Target;
44
use crate::cargo::Subcommand;
5-
use crate::errors::Result;
65
use crate::rustc::TargetList;
76

87
#[derive(Debug)]
@@ -14,7 +13,7 @@ pub struct Args {
1413
pub target_dir: Option<PathBuf>,
1514
}
1615

17-
pub fn parse(target_list: &TargetList) -> Result<Args> {
16+
pub fn parse(target_list: &TargetList) -> Args {
1817
let mut channel = None;
1918
let mut target = None;
2019
let mut target_dir = None;
@@ -56,11 +55,11 @@ pub fn parse(target_list: &TargetList) -> Result<Args> {
5655
}
5756
}
5857

59-
Ok(Args {
58+
Args {
6059
all,
6160
subcommand: sc,
6261
channel,
6362
target,
6463
target_dir,
65-
})
64+
}
6665
}

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ pub fn main() {
208208

209209
fn run() -> Result<ExitStatus> {
210210
let target_list = rustc::target_list(false)?;
211-
let args = cli::parse(&target_list)?;
211+
let args = cli::parse(&target_list);
212212

213213
if args.all.iter().any(|a| a == "--version" || a == "-V") &&
214214
args.subcommand.is_none() {

0 commit comments

Comments
 (0)