Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyan-dfinity committed Oct 25, 2023
1 parent 948faf9 commit f04c235
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
+ `candid::bindings::candid` moves to `candid::pretty::candid`. `candid::pretty` moves to `candid::pretty::utils`. These modules are only available under feature flag `printer` (enabled by default).
+ `candid::types::number::pp_num_str` moves to `candid::utils::pp_num_str`.
+ `candid::types::value` module is only availble under feature flag `value`.
+ `mute_warning` feature flag is removed.
* `candid_parser`: used to be the `parser` and `bindings` module in `candid` crate.
+ Remove `FromStr` trait for `IDLArgs` and `IDLValue`. Use `parse_idl_args` and `parse_idl_value` respectively instead.
+ `TypeEnv.ast_to_type` becomes `candid_parser::typing::ast_to_type`.
+ `candid` is re-exported in `candid_parser::candid`.
+ `candid::*` is re-exported in `candid_parser`.
* `ic_principal`: only for `Principal` and `PrincipalError`.

### Non-breaking changes
Expand Down
5 changes: 3 additions & 2 deletions rust/candid/src/types/subtype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@ fn subtype_(
}
(_, Opt(_)) => {
let msg = format!("FIX ME! {t1} <: {t2} via special opt rule.\nThis means the sender and receiver type has diverged, and can cause data loss.");
Ok(match report {
match report {
OptReport::Slience => (),
OptReport::Warning => eprintln!("{msg}"),
OptReport::Error => return Err(Error::msg(msg)),
})
};
Ok(())
}
(Record(fs1), Record(fs2)) => {
let fields: HashMap<_, _> = fs1.iter().map(|Field { id, ty }| (id, ty)).collect();
Expand Down

0 comments on commit f04c235

Please sign in to comment.