Skip to content

Commit

Permalink
Merge branch 'master' into sync-mandos
Browse files Browse the repository at this point in the history
  • Loading branch information
BiancaIalangi authored Nov 28, 2024
2 parents 2fac9aa + 406e02e commit 7f67242
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ where
fn default() -> DeployCall<Env, ()> {
DeployCall {
code_source: (),
code_metadata: CodeMetadata::DEFAULT,
code_metadata: CodeMetadata::UPGRADEABLE,
arg_buffer: ManagedArgBuffer::new(),
}
}
Expand Down
14 changes: 14 additions & 0 deletions framework/base/src/types/managed/wrapped/managed_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,20 @@ where
M: ManagedTypeApi,
T: ManagedVecItem + Ord + Debug,
{
#[deprecated(since = "0.54.5", note = "Please use method `sort_unstable` instead.")]
#[cfg(feature = "alloc")]
pub fn sort(&mut self) {
self.with_self_as_slice_mut(|slice| {
slice.sort();
slice
});
}

#[deprecated(
since = "0.54.5",
note = "Please use method `sort_unstable_by` instead."
)]
#[cfg(feature = "alloc")]
pub fn sort_by<F>(&mut self, mut compare: F)
where
F: FnMut(&T, &T) -> Ordering,
Expand All @@ -373,6 +380,11 @@ where
});
}

#[deprecated(
since = "0.54.5",
note = "Please use method `sort_unstable_by_key` instead."
)]
#[cfg(feature = "alloc")]
pub fn sort_by_key<K, F>(&mut self, mut f: F)
where
F: FnMut(&T) -> K,
Expand All @@ -384,6 +396,8 @@ where
});
}

#[deprecated]
#[cfg(feature = "alloc")]
pub fn sort_by_cached_key<K, F>(&mut self, mut f: F)
where
F: FnMut(&T) -> K,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use super::{
impl MetaConfig {
pub fn generate_rust_snippets(&self, args: &GenerateSnippetsArgs) {
let main_contract = self.sc_config.main_contract();
let crate_name = &main_contract.contract_name;
let crate_name = &main_contract.contract_name.replace("-", "_");
let mut file =
create_snippets_crate_and_get_lib_file(&self.snippets_dir, crate_name, args.overwrite);
write_snippets_to_file(&mut file, &self.original_contract_abi, crate_name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ where
let mut step = ScDeployStep::new()
.from(address_annotated(env, &from))
.code(code_annotated(env, data.code_source));
step.tx.code_metadata = data.code_metadata;
for arg in data.arg_buffer.iter_buffers() {
step.tx.arguments.push(arg.to_vec().into());
}
Expand Down

0 comments on commit 7f67242

Please sign in to comment.