mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-23 12:23:22 +00:00
Address review nit by making map_id
take an FnMut
.
This commit is contained in:
parent
c4216a50bd
commit
86c5faf42b
@ -172,8 +172,8 @@ impl CodeExtent {
|
||||
|
||||
/// Maps this scope to a potentially new one according to the
|
||||
/// NodeId transformer `f_id`.
|
||||
pub fn map_id<F>(&self, f_id: F) -> CodeExtent where
|
||||
F: Fn(ast::NodeId) -> ast::NodeId,
|
||||
pub fn map_id<F>(&self, mut f_id: F) -> CodeExtent where
|
||||
F: FnMut(ast::NodeId) -> ast::NodeId,
|
||||
{
|
||||
match *self {
|
||||
CodeExtent::Misc(node_id) => CodeExtent::Misc(f_id(node_id)),
|
||||
|
Loading…
Reference in New Issue
Block a user