difftreelog
style accidental dbg push
in: master
2 files changed
crates/jrsonnet-evaluator/src/obj.rsdiffbeforeafterboth3 cell::{Cell, RefCell},4 collections::hash_map::Entry,5 fmt::{self, Debug},6 hash::{Hash, Hasher},3};7};489use educe::Educe;5use jrsonnet_gcmodule::{cc_dyn, Cc, Trace, Weak};10use jrsonnet_gcmodule::{cc_dyn, Cc, Trace, Weak};6use educe::Educe;7use jrsonnet_interner::IStr;11use jrsonnet_interner::IStr;8use jrsonnet_parser::{Span, Visibility};12use jrsonnet_parser::{Span, Visibility};9use rustc_hash::{FxHashMap, FxHashSet};13use rustc_hash::{FxHashMap, FxHashSet};14 error::{suggest_object_fields, ErrorKind::*},18 error::{suggest_object_fields, ErrorKind::*},15 function::{CallLocation, FuncVal},19 function::{CallLocation, FuncVal},16 gc::WithCapacityExt as _,20 gc::WithCapacityExt as _,17 in_frame,21 identity_hash, in_frame,18 identity_hash, 19 operator::evaluate_add_op,22 operator::evaluate_add_op,20 val::ArrValue,23 val::ArrValue,21 CcUnbound, MaybeUnbound, Result, Thunk, Unbound, Val,24 CcUnbound, MaybeUnbound, Result, Thunk, Unbound, Val,659 fn fields_visibility(&self) -> FxHashMap<IStr, (bool, FieldSortKey)> {662 fn fields_visibility(&self) -> FxHashMap<IStr, (bool, FieldSortKey)> {660 let mut out = FxHashMap::default();663 let mut out = FxHashMap::default();661 self.enum_fields(&mut |depth, index, name, visibility| {664 self.enum_fields(&mut |depth, index, name, visibility| {662 dbg!(&name, visibility);663 let new_sort_key = FieldSortKey::new(depth, index);665 let new_sort_key = FieldSortKey::new(depth, index);664 let entry = out.entry(name);666 let entry = out.entry(name);665 let (visible, _) = entry.or_insert((true, new_sort_key));667 let (visible, _) = entry.or_insert((true, new_sort_key));709 return fields;711 return fields;710 }712 }711713712 let mut fields: Vec<_> = dbg!(self714 let mut fields: Vec<_> = self713 .fields_visibility())715 .fields_visibility()714 .into_iter()716 .into_iter()715 .filter(|(_, (visible, _))| include_hidden || *visible)717 .filter(|(_, (visible, _))| include_hidden || *visible)716 .map(|(k, _)| k)718 .map(|(k, _)| k)crates/jrsonnet-evaluator/src/val.rsdiffbeforeafterboth414 self.0414 self.0415 }415 }416 pub(crate) fn truncate_for_bitwise(&self) -> Result<i64> {416 pub(crate) fn truncate_for_bitwise(&self) -> Result<i64> {417 if self.0 < MIN_SAFE_INTEGER || self.0 > dbg!(MAX_SAFE_INTEGER) {417 if self.0 < MIN_SAFE_INTEGER || self.0 > MAX_SAFE_INTEGER {418 bail!("numberic value outside of safe integer range for bitwise operation");418 bail!("numberic value outside of safe integer range for bitwise operation");419 }419 }420 Ok(self.0 as i64)420 Ok(self.0 as i64)