mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
refactor(gateway): share shard helpers and test fixtures (#3381)
This commit is contained in:
1 parent
f22261f218
commit
e7b13fd19f
25 files changed
+101
-2021
No files matched your search
@@ -1,9 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
use crate::{
|
||||
asset_size,
|
||||
constants::{AssetExtension, AssetKind},
|
||||
};
|
||||
use crate::constants::{self, AssetExtension, AssetKind};
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
|
||||
pub enum OutputFormat {
|
||||
@@ -97,7 +94,7 @@ pub fn select_url_variant(input: Input) -> OutputSelection {
|
||||
format: OutputFormat::coerce_from_extension(requested),
|
||||
size: input
|
||||
.requested_size
|
||||
.map(|size| asset_size::clamp_size(size, input.kind)),
|
||||
.map(|size| constants::clamp_size(size, input.kind)),
|
||||
reason: if is_output_format_supported(requested) {
|
||||
"url"
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user