Skip to content

Commit 0f7bb39

Browse files
committed
Clippy
1 parent 4fb1715 commit 0f7bb39

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

crates/bindings/tmc-langs-node/src/de.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ impl<'a, 'j, C: Context<'j>> Deserializer<'a, 'j, C> {
2828
}
2929
}
3030

31-
impl<'x, 'd, 'a, 'j, C: Context<'j>> serde::de::Deserializer<'x>
32-
for &'d mut Deserializer<'a, 'j, C>
31+
impl<'x, 'j, C: Context<'j>> serde::de::Deserializer<'x>
32+
for &mut Deserializer<'_, 'j, C>
3333
{
3434
type Error = LibError;
3535

@@ -171,7 +171,7 @@ impl<'a, 'j, C: Context<'j>> JsArrayAccess<'a, 'j, C> {
171171
}
172172

173173
#[doc(hidden)]
174-
impl<'x, 'a, 'j, C: Context<'j>> SeqAccess<'x> for JsArrayAccess<'a, 'j, C> {
174+
impl<'x, 'j, C: Context<'j>> SeqAccess<'x> for JsArrayAccess<'_, 'j, C> {
175175
type Error = LibError;
176176

177177
fn next_element_seed<T>(&mut self, seed: T) -> LibResult<Option<T::Value>>
@@ -215,7 +215,7 @@ impl<'a, 'j, C: Context<'j>> JsObjectAccess<'a, 'j, C> {
215215
}
216216

217217
#[doc(hidden)]
218-
impl<'x, 'a, 'j, C: Context<'j>> MapAccess<'x> for JsObjectAccess<'a, 'j, C> {
218+
impl<'x, 'j, C: Context<'j>> MapAccess<'x> for JsObjectAccess<'_, 'j, C> {
219219
type Error = LibError;
220220

221221
fn next_key_seed<K>(&mut self, seed: K) -> Result<Option<K::Value>, Self::Error>
@@ -297,7 +297,7 @@ impl<'a, 'j, C: Context<'j>> JsVariantAccess<'a, 'j, C> {
297297
}
298298

299299
#[doc(hidden)]
300-
impl<'x, 'a, 'j, C: Context<'j>> VariantAccess<'x> for JsVariantAccess<'a, 'j, C> {
300+
impl<'x, 'j, C: Context<'j>> VariantAccess<'x> for JsVariantAccess<'_, 'j, C> {
301301
type Error = LibError;
302302

303303
fn unit_variant(self) -> Result<(), Self::Error> {

crates/bindings/tmc-langs-node/src/ser.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ where
269269
}
270270
}
271271

272-
impl<'a, 'j, C> ser::SerializeSeq for ArraySerializer<'a, 'j, C>
272+
impl<'j, C> ser::SerializeSeq for ArraySerializer<'_, 'j, C>
273273
where
274274
C: Context<'j>,
275275
{
@@ -293,7 +293,7 @@ where
293293
}
294294
}
295295

296-
impl<'a, 'j, C> ser::SerializeTuple for ArraySerializer<'a, 'j, C>
296+
impl<'j, C> ser::SerializeTuple for ArraySerializer<'_, 'j, C>
297297
where
298298
C: Context<'j>,
299299
{
@@ -312,7 +312,7 @@ where
312312
}
313313
}
314314

315-
impl<'a, 'j, C> ser::SerializeTupleStruct for ArraySerializer<'a, 'j, C>
315+
impl<'j, C> ser::SerializeTupleStruct for ArraySerializer<'_, 'j, C>
316316
where
317317
C: Context<'j>,
318318
{
@@ -349,7 +349,7 @@ where
349349
}
350350
}
351351

352-
impl<'a, 'j, C> ser::SerializeTupleVariant for TupleVariantSerializer<'a, 'j, C>
352+
impl<'j, C> ser::SerializeTupleVariant for TupleVariantSerializer<'_, 'j, C>
353353
where
354354
C: Context<'j>,
355355
{
@@ -384,7 +384,7 @@ where
384384
}
385385
}
386386

387-
impl<'a, 'j, C> ser::SerializeMap for MapSerializer<'a, 'j, C>
387+
impl<'j, C> ser::SerializeMap for MapSerializer<'_, 'j, C>
388388
where
389389
C: Context<'j>,
390390
{
@@ -425,7 +425,7 @@ where
425425
}
426426
}
427427

428-
impl<'a, 'j, C> ser::SerializeStruct for StructSerializer<'a, 'j, C>
428+
impl<'j, C> ser::SerializeStruct for StructSerializer<'_, 'j, C>
429429
where
430430
C: Context<'j>,
431431
{
@@ -464,7 +464,7 @@ where
464464
}
465465
}
466466

467-
impl<'a, 'j, C> ser::SerializeStructVariant for StructVariantSerializer<'a, 'j, C>
467+
impl<'j, C> ser::SerializeStructVariant for StructVariantSerializer<'_, 'j, C>
468468
where
469469
C: Context<'j>,
470470
{

crates/tmc-langs-cli/bindings.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export type StatusUpdate<T> = { finished: boolean, message: string, "percent-don
2222

2323
export type ClientUpdateData = { "client-update-data-kind": "exercise-download", id: number, path: string, } | { "client-update-data-kind": "posted-submission" } & NewSubmission;
2424

25-
export type StyleValidationResult = { strategy: StyleValidationStrategy, validationErrors: Record<string, Array<StyleValidationError>> | null, }
25+
export type StyleValidationResult = { strategy: StyleValidationStrategy, validation_errors: Record<string, Array<StyleValidationError>> | null, }
2626

27-
export type StyleValidationError = { column: number, line: number, message: string, sourceName: string, }
27+
export type StyleValidationError = { column: number, line: number, message: string, source_name: string, }
2828

2929
export type StyleValidationStrategy = "FAIL" | "WARN" | "DISABLED";
3030

crates/tmc-langs-framework/src/archive.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ pub enum ArchiveIterator<'a, T: Read + Seek> {
173173
Zip(usize, &'a mut zip::ZipArchive<T>),
174174
}
175175

176-
impl<'a, T: Read + Seek> ArchiveIterator<'a, T> {
176+
impl<T: Read + Seek> ArchiveIterator<'_, T> {
177177
/// Returns Break(None) when there's nothing left to iterate.
178178
pub fn with_next<U, F: FnMut(Entry<'_, T>) -> Result<ControlFlow<Option<U>>, TmcError>>(
179179
&mut self,
@@ -226,7 +226,7 @@ pub enum Entry<'a, T: Read> {
226226
Zip(zip::read::ZipFile<'a>),
227227
}
228228

229-
impl<'a, T: Read> Entry<'a, T> {
229+
impl<T: Read> Entry<'_, T> {
230230
pub fn path(&self) -> Result<PathBuf, TmcError> {
231231
match self {
232232
Self::Tar(entry) => {
@@ -268,7 +268,7 @@ impl<'a, T: Read> Entry<'a, T> {
268268
}
269269
}
270270

271-
impl<'a, T: Read> Read for Entry<'a, T> {
271+
impl<T: Read> Read for Entry<'_, T> {
272272
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
273273
match self {
274274
Self::Tar(archive) => archive.read(buf),

crates/tmc-langs-framework/src/tmc_project_yml.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl<'de> Deserialize<'de> for PythonVer {
178178
{
179179
struct PythonVerVisitor;
180180

181-
impl<'de> Visitor<'de> for PythonVerVisitor {
181+
impl Visitor<'_> for PythonVerVisitor {
182182
type Value = PythonVer;
183183

184184
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {

crates/tmc-langs/src/config/tmc_config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::error::LangsError;
44
use serde::{Deserialize, Serialize};
55
use std::{
66
env,
7-
io::{Read, Write},
7+
io::Write,
88
path::{Path, PathBuf},
99
};
1010
use tmc_langs_util::{

crates/tmc-testmycode-client/src/response.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ impl<'de> Deserialize<'de> for SubmissionFeedbackKindString {
518518
struct SubmissionFeedbackKindStringVisitor {}
519519

520520
// parses "text" into Text, and "intrange[x..y]" into IntRange {lower: x, upper: y}
521-
impl<'de> Visitor<'de> for SubmissionFeedbackKindStringVisitor {
521+
impl Visitor<'_> for SubmissionFeedbackKindStringVisitor {
522522
type Value = SubmissionFeedbackKindString;
523523

524524
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {

0 commit comments

Comments
 (0)