Skip to content

Commit

Permalink
Keep super protocol source order
Browse files Browse the repository at this point in the history
We try to keep original source order for clarity, we should do so here
too.
  • Loading branch information
madsmtm committed Jan 13, 2025
1 parent 844e296 commit 0715edd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/header-translator/src/rust_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2539,7 +2539,7 @@ impl Ty {
}

/// SIMD is not yet possible in FFI, see:
/// https://github.com/rust-lang/rust/issues/63068
/// <https://github.com/rust-lang/rust/issues/63068>
pub(crate) fn needs_simd(&self) -> bool {
match self {
Self::Simd { .. } => true,
Expand Down
4 changes: 2 additions & 2 deletions crates/header-translator/src/stmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ pub enum Stmt {
required_items: Vec<ItemIdentifier>,
actual_name: Option<String>,
availability: Availability,
protocols: BTreeSet<ItemIdentifier>,
protocols: Vec<ItemIdentifier>,
methods: Vec<Method>,
required_sendable: bool,
required_mainthreadonly: bool,
Expand Down Expand Up @@ -1062,7 +1062,7 @@ impl Stmt {

verify_objc_decl(entity, context);
let protocols = parse_direct_protocols(entity, context);
let protocols: BTreeSet<_> = protocols
let protocols: Vec<_> = protocols
.into_iter()
.map(|protocol| ItemIdentifier::new(&protocol, context))
.map(|protocol| context.replace_protocol_name(protocol))
Expand Down

0 comments on commit 0715edd

Please sign in to comment.