Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run cargo fmt on sudo_pair #122

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### stable features ###

max_width = 80
max_width = 100

normalize_comments = true
reorder_imports = true
Expand Down
14 changes: 7 additions & 7 deletions sudo_pair/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
// implied. See the License for the specific language governing
// permissions and limitations under the License.

use std::error::Error as StdError;
use std::fmt::{Display, Formatter, Result as FmtResult};
use std::result::Result as StdResult;
use std::error::Error as StdError;

use failure::Context;

use sudo_plugin::prelude::{Error as PluginError, OpenStatus, LogStatus};
use sudo_plugin::prelude::{Error as PluginError, LogStatus, OpenStatus};

pub(crate) type Result<T> = StdResult<T, Error>;

Expand All @@ -37,12 +37,12 @@ impl ErrorKind {
fn as_str(&self) -> &'static str {
match self {
ErrorKind::CommunicationError => "couldn't establish communications with the pair",
ErrorKind::SessionDeclined => "pair declined the session",
ErrorKind::SessionTerminated => "pair ended the session",
ErrorKind::StdinRedirected => "redirection of stdin to paired sessions is prohibited",
ErrorKind::SessionDeclined => "pair declined the session",
ErrorKind::SessionTerminated => "pair ended the session",
ErrorKind::StdinRedirected => "redirection of stdin to paired sessions is prohibited",
ErrorKind::SudoToUserAndGroup => "the -u and -g options may not both be specified",

ErrorKind::PluginError(_) => "the plugin failed to initialize",
ErrorKind::PluginError(_) => "the plugin failed to initialize",
}
}
}
Expand Down Expand Up @@ -94,4 +94,4 @@ impl From<PluginError> for Error {
}
}

impl StdError for Error { }
impl StdError for Error {}
Loading