Merge pull request #688 from Mathieu-Lala/fix/lint

Fix lints warnings and enhance the CI
This commit is contained in:
Stephen Chung
2023-02-10 18:32:14 +08:00
committed by GitHub
41 changed files with 204 additions and 194 deletions

View File

@@ -103,11 +103,11 @@ impl Dynamic {
pub(crate) fn calc_data_sizes(&self, _top: bool) -> (usize, usize, usize) {
match self.0 {
#[cfg(not(feature = "no_index"))]
Union::Array(ref arr, ..) => Self::calc_array_sizes(&**arr),
Union::Array(ref arr, ..) => Self::calc_array_sizes(arr),
#[cfg(not(feature = "no_index"))]
Union::Blob(ref blob, ..) => (blob.len(), 0, 0),
#[cfg(not(feature = "no_object"))]
Union::Map(ref map, ..) => Self::calc_map_sizes(&**map),
Union::Map(ref map, ..) => Self::calc_map_sizes(map),
Union::Str(ref s, ..) => (0, 0, s.len()),
#[cfg(not(feature = "no_closure"))]
Union::Shared(..) if _top => self.read_lock::<Self>().unwrap().calc_data_sizes(true),