-
Notifications
You must be signed in to change notification settings - Fork 31
GH-544 - removing wrap_to_ok() and wrap_to_error() #246
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
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Copyright (c) 2019, MASQ (https://masq.ai) and/or its affiliates. All rights reserved. | ||
|
||
use crate::shared_schema::{ConfiguratorError, ParamError}; | ||
use crate::utils::WrapResult; | ||
// use crate::utils::WrapResult; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove dead code |
||
#[allow(unused_imports)] | ||
use clap::{value_t, values_t}; | ||
use clap::{App, ArgMatches}; | ||
|
@@ -78,7 +78,7 @@ impl<'a> MultiConfig<'a> { | |
_ => return Err(Self::make_configurator_error(e)), | ||
}, | ||
}; | ||
MultiConfig { arg_matches }.wrap_to_ok() | ||
Ok(MultiConfig { arg_matches }) | ||
} | ||
|
||
pub fn make_configurator_error(e: clap::Error) -> ConfiguratorError { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ use crate::sub_lib::cryptde::PlainData; | |
use crate::sub_lib::neighborhood::{RatePack, DEFAULT_RATE_PACK}; | ||
use itertools::Itertools; | ||
use masq_lib::logger::Logger; | ||
use masq_lib::utils::{ExpectValue, WrapResult}; | ||
use masq_lib::utils::{ExpectValue}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The curly braces can go away now |
||
use rusqlite::{params_from_iter, Error, Row, ToSql, Transaction}; | ||
use std::fmt::{Debug, Display, Formatter}; | ||
use tiny_hderive::bip32::ExtendedPrivKey; | ||
|
@@ -96,11 +96,11 @@ impl<'a> DBMigrationUtilitiesReal<'a> { | |
conn: &'b mut dyn ConnectionWrapper, | ||
db_migrator_configuration: DBMigratorInnerConfiguration, | ||
) -> rusqlite::Result<Self> { | ||
Self { | ||
Ok(Self { | ||
root_transaction: Some(conn.transaction()?), | ||
db_migrator_configuration, | ||
} | ||
.wrap_to_ok() | ||
}) | ||
|
||
} | ||
|
||
fn root_transaction_ref(&self) -> &Transaction<'a> { | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove dead code