Skip to content

Commit c2d0d4f

Browse files
committed
run rustfmt on unify folder
1 parent a41505f commit c2d0d4f

File tree

1 file changed

+6
-8
lines changed
  • src/librustc_data_structures/unify

1 file changed

+6
-8
lines changed

src/librustc_data_structures/unify/mod.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ mod tests;
2727
///
2828
/// Clients are expected to provide implementations of this trait; you
2929
/// can see some examples in the `test` module.
30-
pub trait UnifyKey : Copy + Clone + Debug + PartialEq {
30+
pub trait UnifyKey: Copy + Clone + Debug + PartialEq {
3131
type Value: Clone + PartialEq + Debug;
3232

3333
fn index(&self) -> u32;
@@ -115,11 +115,7 @@ impl<K: UnifyKey> VarValue<K> {
115115
}
116116

117117
fn if_not_self(&self, key: K, self_key: K) -> Option<K> {
118-
if key == self_key {
119-
None
120-
} else {
121-
Some(key)
122-
}
118+
if key == self_key { None } else { Some(key) }
123119
}
124120
}
125121

@@ -236,7 +232,8 @@ impl<K: UnifyKey> UnificationTable<K> {
236232
new_rank: u32,
237233
old_root: VarValue<K>,
238234
new_root: VarValue<K>,
239-
new_value: K::Value) -> K {
235+
new_value: K::Value)
236+
-> K {
240237
let old_root_key = old_root.key();
241238
let new_root_key = new_root.key();
242239
self.set(old_root_key, old_root.redirect(new_root_key));
@@ -306,7 +303,8 @@ impl<'tcx, K, V> UnificationTable<K>
306303
let combined = {
307304
match (&node_a.value, &node_b.value) {
308305
(&None, &None) => None,
309-
(&Some(ref v), &None) | (&None, &Some(ref v)) => Some(v.clone()),
306+
(&Some(ref v), &None) |
307+
(&None, &Some(ref v)) => Some(v.clone()),
310308
(&Some(ref v1), &Some(ref v2)) => {
311309
if *v1 != *v2 {
312310
return Err((v1.clone(), v2.clone()));

0 commit comments

Comments
 (0)