Skip to content

Commit

Permalink
Merge branch 'main' into untrodden-flavic
Browse files Browse the repository at this point in the history
  • Loading branch information
sisuresh committed Jun 16, 2023
2 parents 38f2128 + caf342d commit 05f54b0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions soroban-ledger-snapshot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl LedgerSnapshot {
protocol_version: self.protocol_version,
sequence_number: self.sequence_number,
timestamp: self.timestamp,
network_id: self.network_id.clone(),
network_id: self.network_id,
base_reserve: self.base_reserve,
min_persistent_entry_expiration: self.min_persistent_entry_expiration,
min_temp_entry_expiration: self.min_temp_entry_expiration,
Expand Down Expand Up @@ -170,7 +170,7 @@ impl Default for LedgerSnapshot {

impl SnapshotSource for &LedgerSnapshot {
fn get(&self, key: &Rc<LedgerKey>) -> Result<Rc<LedgerEntry>, HostError> {
match self.ledger_entries.iter().find(|(k, _)| &**k == &**key) {
match self.ledger_entries.iter().find(|(k, _)| **k == **key) {
Some((_, v)) => Ok(Rc::new(*v.clone())),
None => Err(ScError {
type_: ScErrorType::Storage,
Expand All @@ -180,7 +180,7 @@ impl SnapshotSource for &LedgerSnapshot {
}
}
fn has(&self, key: &Rc<LedgerKey>) -> Result<bool, HostError> {
Ok(self.ledger_entries.iter().any(|(k, _)| &**k == &**key))
Ok(self.ledger_entries.iter().any(|(k, _)| **k == **key))
}
}

Expand Down
2 changes: 1 addition & 1 deletion soroban-sdk-macros/src/derive_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn derive_type_enum(
// TODO: Use attributes tagged on variant to control whether field is included.
let case_ident = &variant.ident;
let case_name = &case_ident.to_string();
let case_name_str_lit = Literal::string(&case_name);
let case_name_str_lit = Literal::string(case_name);
let case_num_lit = Literal::usize_unsuffixed(case_num);
if case_name.len() > SCSYMBOL_LIMIT as usize {
errors.push(Error::new(
Expand Down
6 changes: 3 additions & 3 deletions soroban-sdk/src/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ impl Address {
///
/// If the invocation is not authorized.
pub fn require_auth_for_args(&self, args: Vec<RawVal>) {
self.env.require_auth_for_args(&self, args);
self.env.require_auth_for_args(self, args);
}

/// Ensures that this Address has authorized invocation of the current
Expand All @@ -221,9 +221,9 @@ impl Address {
///
/// ### Panics
///
/// If the invocation is not authorized.
/// If the invocation is not authorized.
pub fn require_auth(&self) {
self.env.require_auth(&self);
self.env.require_auth(self);
}

/// Creates an `Address` corresponding to the provided contract identifier.
Expand Down
4 changes: 2 additions & 2 deletions soroban-sdk/src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ impl TryFromVal<Env, &[u8]> for Bytes {
type Error = ConversionError;

fn try_from_val(env: &Env, v: &&[u8]) -> Result<Self, Self::Error> {
Ok(Bytes::from_slice(env, *v))
Ok(Bytes::from_slice(env, v))
}
}

Expand Down Expand Up @@ -1384,7 +1384,7 @@ mod test {
let env = Env::default();
let mut bin = bytes![&env, [1, 2, 3, 4]];

assert_eq!(bin.remove_unchecked(2), ());
bin.remove_unchecked(2);
assert_eq!(bin, bytes![&env, [1, 2, 4]]);
assert_eq!(bin.len(), 3);
}
Expand Down
2 changes: 1 addition & 1 deletion soroban-sdk/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ impl Env {
/// )),
/// sub_invocations: std::vec![]
/// }
/// )]
/// )]
/// );
/// }
/// # #[cfg(not(feature = "testutils"))]
Expand Down

0 comments on commit 05f54b0

Please sign in to comment.