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:
parent
5e0f404fc7
commit
aa68d742c9
4 changed files with 12 additions and 6 deletions
|
|
@ -3729,7 +3729,7 @@ impl StorageBackend for PostgresBackend {
|
|||
))
|
||||
})
|
||||
})
|
||||
.transpose()?;
|
||||
.transpose()?; // u32 fits in i32 for any valid track index, error is a safeguard
|
||||
let offset_ms = i32::try_from(subtitle.offset_ms).map_err(|_| {
|
||||
PinakesError::InvalidOperation(format!(
|
||||
"subtitle offset_ms {} exceeds i32 range",
|
||||
|
|
@ -3791,7 +3791,7 @@ impl StorageBackend for PostgresBackend {
|
|||
is_embedded: row.get("is_embedded"),
|
||||
track_index: row
|
||||
.get::<_, Option<i32>>("track_index")
|
||||
.map(|i| usize::try_from(i).unwrap_or(0)),
|
||||
.map(|i| u32::try_from(i).unwrap_or(0)),
|
||||
offset_ms: i64::from(row.get::<_, i32>("offset_ms")),
|
||||
created_at: row.get("created_at"),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue