Skip to content

Commit 0a34510

Browse files
thunderseethecopybara-github
authored andcommitted
Fix warnings.
PiperOrigin-RevId: 880809029
1 parent baeefcb commit 0a34510

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cc_bindings_from_rs/generate_bindings/format_type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use std::rc::Rc;
3838

3939
/// Implementation of `BindingsGenerator::format_top_level_ns_for_crate`.
4040
pub fn format_top_level_ns_for_crate(db: &BindingsGenerator<'_>, krate: CrateNum) -> Rc<[Symbol]> {
41-
let mut crate_name = db.tcx().crate_name(krate);
41+
let crate_name = db.tcx().crate_name(krate);
4242
let crate_needle_name =
4343
if krate == db.source_crate_num() { "self" } else { crate_name.as_str() };
4444
if let Some(namespaces) = db.crate_name_to_namespace().get(crate_needle_name) {

cc_bindings_from_rs/generate_bindings/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ fn symbol_canonical_name(db: &BindingsGenerator<'_>, def_id: DefId) -> Option<Fu
589589
// to include the `_rust_proto` suffix, but the rmeta file contains the unsuffixed crate name.
590590
// If we're naming a symbol from our source crate, use the source crate name as the krate name
591591
// to resolve any renaming issues.
592-
let mut krate = (def_id.krate == db.source_crate_num())
592+
let krate = (def_id.krate == db.source_crate_num())
593593
.then_some(())
594594
.and_then(|_| db.source_crate_name())
595595
.map(|source_crate_name| Symbol::intern(source_crate_name.as_ref()))

0 commit comments

Comments
 (0)