pinakes-core: fix minor clippy warnings; add toggle for Swagger UI generation

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ie33a5d17b774289023e3855789d3adc86a6a6964
This commit is contained in:
raf 2026-03-21 02:15:31 +03:00
commit aa68d742c9
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
4 changed files with 12 additions and 6 deletions

View file

@ -4297,9 +4297,7 @@ impl StorageBackend for SqliteBackend {
.as_ref()
.map(|p| p.to_string_lossy().to_string());
let is_embedded = subtitle.is_embedded;
let track_index = subtitle
.track_index
.map(|i| i64::try_from(i).unwrap_or(i64::MAX));
let track_index = subtitle.track_index.map(i64::from);
let offset_ms = subtitle.offset_ms;
let now = subtitle.created_at.to_rfc3339();
let fut = tokio::task::spawn_blocking(move || {
@ -4365,7 +4363,7 @@ impl StorageBackend for SqliteBackend {
is_embedded: row.get::<_, i32>(5)? != 0,
track_index: row
.get::<_, Option<i64>>(6)?
.map(|i| usize::try_from(i).unwrap_or(0)),
.and_then(|i| u32::try_from(i).ok()),
offset_ms: row.get(7)?,
created_at: parse_datetime(&created_str),
})