From 568655d566dd73002207e536b39591be5192e19f Mon Sep 17 00:00:00 2001 From: l3ops Date: Wed, 5 Oct 2022 16:09:10 +0200 Subject: [PATCH] address PR review --- crates/rome_service/src/workspace/server.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/rome_service/src/workspace/server.rs b/crates/rome_service/src/workspace/server.rs index 30707b198062..bf2d90058ee4 100644 --- a/crates/rome_service/src/workspace/server.rs +++ b/crates/rome_service/src/workspace/server.rs @@ -170,14 +170,14 @@ impl WorkspaceServer { .ok_or_else(self.build_capability_error(rome_path))?; /// Limit the size of files to 1.0 MiB - const SIZE_LIMIT: usize = 1024 * 1024; + const SIZE_LIMIT_IN_BYTES: usize = 1024 * 1024; let size = document.content.as_bytes().len(); - if size >= SIZE_LIMIT { + if size >= SIZE_LIMIT_IN_BYTES { return Err(RomeError::FileTooLarge { path: rome_path.to_path_buf(), size, - limit: SIZE_LIMIT, + limit: SIZE_LIMIT_IN_BYTES, }); }