Skip to content

Commit

Permalink
Depreciated legacy tree map (#963)
Browse files Browse the repository at this point in the history
* Depreciated legacy tree map

* Added migration and prop test of it

* Remove diagnostic print

* Removed migration code until someone asks for it

* Removed migration guide
  • Loading branch information
DavidM-D authored Nov 29, 2022
1 parent c993642 commit 1849287
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions near-sdk/src/collections/legacy_tree_map.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
//! Legacy `TreeMap` implementation that is using `UnorderedMap`.
//! DEPRECATED. This implementation is deprecated and may be removed in the future.
#![allow(clippy::all)]
// This suppresses the depreciation warnings for uses of LegacyTreeMap in this module
#![allow(deprecated)]

use borsh::{BorshDeserialize, BorshSerialize};
use std::ops::Bound;
Expand All @@ -18,6 +20,7 @@ use crate::IntoStorageKey;
/// - `above`/`below`: O(log(N))
/// - `range` of K elements: O(Klog(N))
///
#[deprecated(since = "4.1.0", note = "Use near_sdk::collections::TreeMap")]
#[derive(BorshSerialize, BorshDeserialize)]
pub struct LegacyTreeMap<K, V> {
root: u64,
Expand Down
1 change: 1 addition & 0 deletions near-sdk/src/collections/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
//! that seemlessly integrated with the rest of the Rust standard library.
mod legacy_tree_map;
#[allow(deprecated)]
pub use legacy_tree_map::LegacyTreeMap;

mod lookup_map;
Expand Down

0 comments on commit 1849287

Please sign in to comment.