Skip to content

Commit cdcd089

Browse files
committed
cargo clippy
1 parent e010f53 commit cdcd089

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

core/engine/src/object/operations.rs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -891,8 +891,7 @@ impl JsObject {
891891
if !self.extensible() {
892892
return Err(js_error!(
893893
TypeError: "cannot add private field to non-extensible class instance"
894-
)
895-
.into());
894+
));
896895
}
897896

898897
// 2. If the host is a web browser, then
@@ -906,7 +905,7 @@ impl JsObject {
906905

907906
// 4. If entry is not empty, throw a TypeError exception.
908907
if entry.is_some() {
909-
return Err(js_error!(TypeError: "private field already exists on prototype").into());
908+
return Err(js_error!(TypeError: "private field already exists on prototype"));
910909
}
911910

912911
// 5. Append PrivateElement { [[Key]]: P, [[Kind]]: field, [[Value]]: value } to O.[[PrivateElements]].
@@ -948,13 +947,11 @@ impl JsObject {
948947
return if getter || setter {
949948
Err(js_error!(
950949
TypeError: "cannot add private accessor to non-extensible class instance"
951-
)
952-
.into())
950+
))
953951
} else {
954952
Err(js_error!(
955953
TypeError: "cannot add private method to non-extensible class instance"
956-
)
957-
.into())
954+
))
958955
};
959956
}
960957

@@ -972,13 +969,11 @@ impl JsObject {
972969
return if getter || setter {
973970
Err(js_error!(
974971
TypeError: "private accessor already exists on class instance"
975-
)
976-
.into())
972+
))
977973
} else {
978974
Err(js_error!(
979975
TypeError: "private method already exists on class instance"
980-
)
981-
.into())
976+
))
982977
};
983978
}
984979

0 commit comments

Comments
 (0)