style: format core with rustfmt
This commit is contained in:
parent
447be4b38d
commit
8872ec6c98
12 changed files with 186 additions and 81 deletions
|
|
@ -58,9 +58,7 @@ impl Session {
|
|||
/// the hint rides along this way rather than in the stored row.
|
||||
#[cfg(feature = "store")]
|
||||
fn account_with_dial(store: &Store, dial: Option<&str>) -> Result<Address, Error> {
|
||||
let addr = store
|
||||
.account()?
|
||||
.ok_or(Error::NotRegistered)?;
|
||||
let addr = store.account()?.ok_or(Error::NotRegistered)?;
|
||||
Ok(match dial {
|
||||
Some(dial) => addr.with_dial(dial),
|
||||
None => addr,
|
||||
|
|
@ -140,8 +138,9 @@ pub fn connect(
|
|||
{
|
||||
let _ = (addr, require_pin);
|
||||
Err(Error::Other(
|
||||
"smol+rns:// addresses need the rns feature; rebuild with --features rns".into(),
|
||||
))
|
||||
"smol+rns:// addresses need the rns feature; rebuild with --features rns"
|
||||
.into(),
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -437,7 +436,12 @@ pub fn rotate(
|
|||
/// `connect` + `resolve`, `find_rotation_index`, then the four `set_*`
|
||||
/// calls below.
|
||||
#[cfg(feature = "store")]
|
||||
pub fn restore(store: &Store, master: &[u8; KEY_LEN], addr: &Address, timeout: u64) -> Result<u32, Error> {
|
||||
pub fn restore(
|
||||
store: &Store,
|
||||
master: &[u8; KEY_LEN],
|
||||
addr: &Address,
|
||||
timeout: u64,
|
||||
) -> Result<u32, Error> {
|
||||
let mut session = connect(store, addr, false, timeout)?;
|
||||
let (identity, _) = resolve(session.transport(), &addr.user)?;
|
||||
session.close();
|
||||
|
|
@ -671,7 +675,10 @@ pub fn fetch_with(
|
|||
acknowledged: !opts.keep,
|
||||
cancelled: false,
|
||||
};
|
||||
let cancelled = || opts.cancel.is_some_and(|c| c.load(std::sync::atomic::Ordering::Relaxed));
|
||||
let cancelled = || {
|
||||
opts.cancel
|
||||
.is_some_and(|c| c.load(std::sync::atomic::Ordering::Relaxed))
|
||||
};
|
||||
let mut session = connect(store, &addr, true, opts.timeout)?;
|
||||
let transport = session.transport();
|
||||
authenticate(transport, &addr.user, account, store)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue