From 20f60fa11f333ba9701c484950d04c18084e5d75 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Sun, 14 Sep 2025 02:47:18 +0800 Subject: [PATCH] .. --- yazi-sftp/src/requests/init.rs | 2 +- yazi-sftp/src/responses/version.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yazi-sftp/src/requests/init.rs b/yazi-sftp/src/requests/init.rs index 629e7f00..757e2967 100644 --- a/yazi-sftp/src/requests/init.rs +++ b/yazi-sftp/src/requests/init.rs @@ -13,7 +13,7 @@ impl Init { pub fn len(&self) -> usize { size_of_val(&self.version) - + self.extensions.iter().map(|(k, v)| 8 + k.len() + v.len()).sum::() + + self.extensions.iter().map(|(k, v)| 4 + k.len() + 4 + v.len()).sum::() } } diff --git a/yazi-sftp/src/responses/version.rs b/yazi-sftp/src/responses/version.rs index 67c31c4d..967ff60a 100644 --- a/yazi-sftp/src/responses/version.rs +++ b/yazi-sftp/src/responses/version.rs @@ -11,6 +11,6 @@ pub struct Version { impl Version { pub fn len(&self) -> usize { size_of_val(&self.version) - + self.extensions.iter().map(|(k, v)| 8 + k.len() + v.len()).sum::() + + self.extensions.iter().map(|(k, v)| 4 + k.len() + 4 + v.len()).sum::() } }