Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit 3ec6054

Browse files
author
Hendrik van Antwerpen
committed
Move single-use constant into function.
1 parent 0d1443a commit 3ec6054

File tree

1 file changed

+2
-2
lines changed
  • tree-sitter-stack-graphs/src/cli

1 file changed

+2
-2
lines changed

tree-sitter-stack-graphs/src/cli/match.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ use crate::loader::FileReader;
2121
use crate::loader::Loader;
2222
use crate::NoCancellation;
2323

24-
const MAX_TEXT_LENGTH: usize = 16;
25-
2624
/// Match file
2725
#[derive(Args)]
2826
pub struct MatchArgs {
@@ -126,6 +124,8 @@ fn print_matches(
126124
}
127125

128126
fn print_node_text(node: Node, source_path: &Path, source: &str) -> anyhow::Result<()> {
127+
const MAX_TEXT_LENGTH: usize = 16;
128+
129129
print!(", text: \"");
130130
let text = node.utf8_text(source.as_bytes())?;
131131
let summary: String = text

0 commit comments

Comments
 (0)