Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyan-dfinity committed Dec 15, 2023
1 parent c2897c1 commit 62d8759
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rust/candid_parser/src/typing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,9 @@ fn merge_actor(
let serv = env.te.as_service(&t)?;
let mut ms: Vec<_> = serv.iter().chain(meths.iter()).cloned().collect();
ms.sort_unstable_by(|a, b| a.0.partial_cmp(&b.0).unwrap());
check_unique(ms.iter().map(|m| &m.0))
.map_err(|e| Error::msg(format!("Duplicate imported method name: {e}")))?;
check_unique(ms.iter().map(|m| &m.0)).map_err(|e| {
Error::msg(format!("Duplicate imported method name: {e}"))
})?;
let res: Type = TypeInner::Service(ms).into();
Ok(Some(res))
}
Expand Down

0 comments on commit 62d8759

Please sign in to comment.