Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyan-dfinity committed Mar 25, 2024
1 parent 95019e5 commit 4005c74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rust/candid/src/pretty/candid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pub fn pp_ty_inner(ty: &TypeInner) -> RcDoc {
_ => unreachable!(),
}
}
Knot(ref id) => str(id.name),
Knot(ref id) => RcDoc::text(format!("{id}")),
Unknown => str("unknown"),
Future => str("future"),
}
Expand Down
2 changes: 1 addition & 1 deletion rust/candid/src/types/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ pub fn text_size(t: &Type, limit: i32) -> Result<i32, ()> {
Float32 | Float64 => 7,
Reserved => 8,
Principal => 9,
Knot(id) => id.name.len() as i32,
Knot(_) => 10,
Var(id) => id.len() as i32,
Opt(t) => 4 + text_size(t, limit - 4)?,
Vec(t) => 4 + text_size(t, limit - 4)?,
Expand Down

0 comments on commit 4005c74

Please sign in to comment.