Skip to content

Commit fbb5a15

Browse files
committed
style: lint
1 parent 1e49daf commit fbb5a15

File tree

6 files changed

+28
-37
lines changed

6 files changed

+28
-37
lines changed

tests-e2e/test4/entry_point.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pub struct Point {
99
y: i32,
1010
}
1111

12+
#[allow(unused_variables)]
1213
#[wasm_bindgen]
1314
pub fn consume(point: Point) {}
1415

@@ -17,6 +18,7 @@ pub fn into_js() -> Point {
1718
Point { x: 0, y: 0 }
1819
}
1920

21+
#[allow(unused_variables)]
2022
#[wasm_bindgen]
2123
pub fn consume_vector(points: Vec<Point>) {}
2224

tests-e2e/test5/entry_point.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ extern "C" {
1515
pub fn call_js(point: &Point);
1616
}
1717

18+
#[allow(unused_variables)]
1819
#[wasm_bindgen]
1920
pub fn accept_ref_point(point: &Point) {}

tests/expand/borrow.expanded.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,12 @@ const _: () = {
5959
Err(err) => {
6060
let loc = core::panic::Location::caller();
6161
let msg = ::alloc::__export::must_use({
62-
let res = ::alloc::fmt::format(
62+
::alloc::fmt::format(
6363
format_args!(
6464
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
6565
.file(), loc.line(), loc.column(),
6666
),
67-
);
68-
res
67+
)
6968
});
7069
{
7170
#[cold]
@@ -117,13 +116,12 @@ const _: () = {
117116
Err(err) => {
118117
let loc = core::panic::Location::caller();
119118
let msg = ::alloc::__export::must_use({
120-
let res = ::alloc::fmt::format(
119+
::alloc::fmt::format(
121120
format_args!(
122121
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
123122
.file(), loc.line(), loc.column(),
124123
),
125-
);
126-
res
124+
)
127125
});
128126
{
129127
#[cold]
@@ -157,13 +155,12 @@ const _: () = {
157155
Err(err) => {
158156
let loc = core::panic::Location::caller();
159157
let msg = ::alloc::__export::must_use({
160-
let res = ::alloc::fmt::format(
158+
::alloc::fmt::format(
161159
format_args!(
162160
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
163161
.file(), loc.line(), loc.column(),
164162
),
165-
);
166-
res
163+
)
167164
});
168165
{
169166
#[cold]

tests/expand/generic_enum.expanded.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,12 @@ const _: () = {
6060
Err(err) => {
6161
let loc = core::panic::Location::caller();
6262
let msg = ::alloc::__export::must_use({
63-
let res = ::alloc::fmt::format(
63+
::alloc::fmt::format(
6464
format_args!(
6565
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
6666
.file(), loc.line(), loc.column(),
6767
),
68-
);
69-
res
68+
)
7069
});
7170
{
7271
#[cold]
@@ -118,13 +117,12 @@ const _: () = {
118117
Err(err) => {
119118
let loc = core::panic::Location::caller();
120119
let msg = ::alloc::__export::must_use({
121-
let res = ::alloc::fmt::format(
120+
::alloc::fmt::format(
122121
format_args!(
123122
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
124123
.file(), loc.line(), loc.column(),
125124
),
126-
);
127-
res
125+
)
128126
});
129127
{
130128
#[cold]
@@ -158,13 +156,12 @@ const _: () = {
158156
Err(err) => {
159157
let loc = core::panic::Location::caller();
160158
let msg = ::alloc::__export::must_use({
161-
let res = ::alloc::fmt::format(
159+
::alloc::fmt::format(
162160
format_args!(
163161
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
164162
.file(), loc.line(), loc.column(),
165163
),
166-
);
167-
res
164+
)
168165
});
169166
{
170167
#[cold]

tests/expand/generic_struct.expanded.rs

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,12 @@ const _: () = {
5757
Err(err) => {
5858
let loc = core::panic::Location::caller();
5959
let msg = ::alloc::__export::must_use({
60-
let res = ::alloc::fmt::format(
60+
::alloc::fmt::format(
6161
format_args!(
6262
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
6363
.file(), loc.line(), loc.column(),
6464
),
65-
);
66-
res
65+
)
6766
});
6867
{
6968
#[cold]
@@ -115,13 +114,12 @@ const _: () = {
115114
Err(err) => {
116115
let loc = core::panic::Location::caller();
117116
let msg = ::alloc::__export::must_use({
118-
let res = ::alloc::fmt::format(
117+
::alloc::fmt::format(
119118
format_args!(
120119
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
121120
.file(), loc.line(), loc.column(),
122121
),
123-
);
124-
res
122+
)
125123
});
126124
{
127125
#[cold]
@@ -155,13 +153,12 @@ const _: () = {
155153
Err(err) => {
156154
let loc = core::panic::Location::caller();
157155
let msg = ::alloc::__export::must_use({
158-
let res = ::alloc::fmt::format(
156+
::alloc::fmt::format(
159157
format_args!(
160158
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
161159
.file(), loc.line(), loc.column(),
162160
),
163-
);
164-
res
161+
)
165162
});
166163
{
167164
#[cold]
@@ -307,13 +304,12 @@ const _: () = {
307304
Err(err) => {
308305
let loc = core::panic::Location::caller();
309306
let msg = ::alloc::__export::must_use({
310-
let res = ::alloc::fmt::format(
307+
::alloc::fmt::format(
311308
format_args!(
312309
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
313310
.file(), loc.line(), loc.column(),
314311
),
315-
);
316-
res
312+
)
317313
});
318314
{
319315
#[cold]
@@ -365,13 +361,12 @@ const _: () = {
365361
Err(err) => {
366362
let loc = core::panic::Location::caller();
367363
let msg = ::alloc::__export::must_use({
368-
let res = ::alloc::fmt::format(
364+
::alloc::fmt::format(
369365
format_args!(
370366
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
371367
.file(), loc.line(), loc.column(),
372368
),
373-
);
374-
res
369+
)
375370
});
376371
{
377372
#[cold]
@@ -405,13 +400,12 @@ const _: () = {
405400
Err(err) => {
406401
let loc = core::panic::Location::caller();
407402
let msg = ::alloc::__export::must_use({
408-
let res = ::alloc::fmt::format(
403+
::alloc::fmt::format(
409404
format_args!(
410405
"(Converting type failed) {0} ({1}:{2}:{3})", err, loc
411406
.file(), loc.line(), loc.column(),
412407
),
413-
);
414-
res
408+
)
415409
});
416410
{
417411
#[cold]

tsify-macros/src/container.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl<'a> Container<'a> {
9393
}
9494

9595
/// Information about the data fields of the type as parsed by Serde.
96-
pub fn serde_data(&self) -> &ast::Data {
96+
pub fn serde_data(&self) -> &ast::Data<'_> {
9797
&self.serde_container.data
9898
}
9999

0 commit comments

Comments
 (0)