Skip to content

Commit

Permalink
corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
aawsome committed Sep 13, 2024
1 parent e9f386e commit 703ea62
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions crates/core/src/repository/command_input.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
use std::{fmt::Display, process::Command, str::FromStr};

use crate::RusticResult;
use crate::{error::RusticErrorKind, RusticError};
#[cfg(windows)]
use itertools::Itertools;
use log::{debug, trace, warn};
use serde::{Deserialize, Serialize};
use serde_with::{serde_as, DisplayFromStr, PickFirst};

use crate::RusticResult;
#[cfg(not(windows))]
use crate::{error::RusticErrorKind, RusticError};

/// A command to be called which can be given as CLI option as well as in config files
/// `CommandInput` implements Serialize/Deserialize as well as FromStr.
#[serde_as]
Expand Down Expand Up @@ -36,15 +40,15 @@ impl CommandInput {

/// Returns the command if it is set
///
/// # Panics
///
/// Panics if no command is set.
#[must_use]
pub fn command(&self) -> &str {
&self.0.command.as_ref().unwrap()
self.0.command.as_ref().unwrap()
}

/// Returns the command args if it is set
///
/// Panics if no command is set.
#[must_use]
pub fn args(&self) -> &[String] {
&self.0.args.0
Expand Down

0 comments on commit 703ea62

Please sign in to comment.