mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Simplify
This commit is contained in:
parent
4251f083b5
commit
d8649c1af8
2 changed files with 10 additions and 13 deletions
|
@ -67,14 +67,11 @@ pub fn profile(desc: &str) -> Profiler {
|
|||
|
||||
PROFILE_STACK.with(|stack| {
|
||||
let mut stack = stack.borrow_mut();
|
||||
if stack.starts.len() == 0 {
|
||||
match FILTER.try_read() {
|
||||
Ok(f) => {
|
||||
if f.version > stack.filter_data.version {
|
||||
stack.filter_data = f.clone();
|
||||
}
|
||||
if stack.starts.is_empty() {
|
||||
if let Ok(f) = FILTER.try_read() {
|
||||
if f.version > stack.filter_data.version {
|
||||
stack.filter_data = f.clone();
|
||||
}
|
||||
Err(_) => (),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue