mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
define size inline
This commit is contained in:
parent
ee0216a1a0
commit
37d30d700c
1 changed files with 3 additions and 6 deletions
|
|
@ -13,13 +13,10 @@ impl Titan {
|
||||||
|
|
||||||
/// Get header string for `Self`
|
/// Get header string for `Self`
|
||||||
pub fn header(&self) -> String {
|
pub fn header(&self) -> String {
|
||||||
// Calculate data size
|
|
||||||
let size = self.data.len();
|
|
||||||
|
|
||||||
// Build header
|
|
||||||
let mut header = format!(
|
let mut header = format!(
|
||||||
"{};size={size}",
|
"{};size={}",
|
||||||
self.uri.to_string_partial(UriHideFlags::QUERY)
|
self.uri.to_string_partial(UriHideFlags::QUERY),
|
||||||
|
self.data.len()
|
||||||
);
|
);
|
||||||
if let Some(ref mime) = self.mime {
|
if let Some(ref mime) = self.mime {
|
||||||
header.push_str(&format!(";mime={mime}"));
|
header.push_str(&format!(";mime={mime}"));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue