返回 CodeWhale
note.rs
根目录 / crates / tui / src / commands / groups / memory / note.rs
1 //! Note command: manage persistent workspace notes.
2
3 use std::fs;
4 use std::io::Write;
5 use std::path::{Path, PathBuf};
6
7 use codewhale_command_contract::handler::{CommandCapabilities, CommandContexts, CommandHandler};
8 use codewhale_command_contract::metadata::{CommandInfo, RegisterCommand};
9
10 use crate::commands::CommandResult;
11
12 const USAGE: &str = "/note <text> | /note add <text> | /note list | /note show <n> | /note edit <n> <text> | /note remove <n> | /note clear | /note path";
13
14 /// Manage the persistent workspace notes file.
15 fn note(workspace: &Path, content: Option<&str>) -> CommandResult {
16 let input = match content {
17 Some(c) => c.trim(),
18 None => {
19 return CommandResult::error(format!("Usage: {USAGE}"));
20 }
21 };
22
23 if input.is_empty() {
24 return CommandResult::error("Note content cannot be empty");
25 }
26
27 let notes_path = notes_path(workspace);
28 let (command, rest) = split_command(input);
29 let command = command.to_ascii_lowercase();
30 if !matches!(command.as_str(), "path" | "help")
31 && let Err(error) = ensure_notes_target_in_workspace(&notes_path, workspace)
32 {
33 return CommandResult::error(error);
34 }
35
36 match command.as_str() {
37 "add" => append_note_command(workspace, &notes_path, rest),
38 "list" => list_notes_command(workspace, &notes_path),
39 "show" => show_note_command(workspace, &notes_path, rest),
40 "edit" => edit_note_command(workspace, &notes_path, rest),
41 "remove" | "rm" | "delete" => remove_note_command(workspace, &notes_path, rest),
42 "clear" => clear_notes_command(workspace, &notes_path),
43 "path" => CommandResult::message(format!("Notes path: {}", notes_path.display())),
44 "help" => CommandResult::message(format!("Usage: {USAGE}")),
45 _ => append_note_command(workspace, &notes_path, Some(input)),
46 }
47 }
48
49 /// Resolve the notes file. An existing `.codewhale` notes file is preferred;
50 /// otherwise the `.deepseek` notes path is used (D3 — the fallback stays
51 /// handler-owned through standard filesystem operations). The dock's NOTES
52 /// view reads the same file through this resolver (#6565).
53 pub(crate) fn notes_path(workspace: &Path) -> PathBuf {
54 let primary = workspace.join(".codewhale").join("notes.md");
55 if primary.symlink_metadata().is_ok() || workspace.join(".codewhale").is_symlink() {
56 return primary;
57 }
58 workspace.join(".deepseek").join("notes.md")
59 }
60
61 /// The notes file lives in the workspace, which may be a cloned repository:
62 /// a committed `notes.md -> ~/.zshrc` or a symlinked `.codewhale/` must not
63 /// let `/note clear` empty (or `/note list` print) a file outside it. Same
64 /// rule as the `note` tool.
65 fn ensure_notes_target_in_workspace(notes_path: &Path, workspace: &Path) -> Result<(), String> {
66 if let Ok(meta) = fs::symlink_metadata(notes_path)
67 && (meta.file_type().is_symlink() || !meta.is_file())
68 {
69 return Err(format!(
70 "Refusing to use {}: the notes path is a symlink or not a regular file.",
71 notes_path.display()
72 ));
73 }
74 let (Some(parent), Ok(root)) = (notes_path.parent(), fs::canonicalize(workspace)) else {
75 return Ok(());
76 };
77 // Only existing ancestors can redirect; the rest is created as real
78 // directories.
79 let mut existing = parent.to_path_buf();
80 while !existing.exists() {
81 if !existing.pop() {
82 return Ok(());
83 }
84 }
85 match fs::canonicalize(&existing) {
86 Ok(resolved) if !resolved.starts_with(&root) => Err(format!(
87 "Refusing to use {}: its directory resolves outside the workspace.",
88 notes_path.display()
89 )),
90 _ => Ok(()),
91 }
92 }
93
94 fn split_command(input: &str) -> (&str, Option<&str>) {
95 match input.find(char::is_whitespace) {
96 Some(index) => (&input[..index], Some(input[index..].trim())),
97 None => (input, None),
98 }
99 }
100
101 fn append_note_command(
102 workspace: &Path,
103 notes_path: &Path,
104 content: Option<&str>,
105 ) -> CommandResult {
106 let Some(note_content) = content.map(str::trim).filter(|content| !content.is_empty()) else {
107 return CommandResult::error("Usage: /note add <text>");
108 };
109
110 match append_note(workspace, notes_path, note_content) {
111 Ok(()) => CommandResult::message(format!("Note appended to {}", notes_path.display())),
112 Err(e) => CommandResult::error(e),
113 }
114 }
115
116 fn list_notes_command(workspace: &Path, notes_path: &Path) -> CommandResult {
117 let notes = match read_notes(workspace, notes_path) {
118 Ok(notes) => notes,
119 Err(e) => return CommandResult::error(e),
120 };
121
122 if notes.is_empty() {
123 return CommandResult::message(format!("No notes found at {}", notes_path.display()));
124 }
125
126 let mut output = format!("Notes in {}:", notes_path.display());
127 for (index, note) in notes.iter().enumerate() {
128 output.push_str(&format!("\n\n{}. {}", index + 1, note_preview(note)));
129 }
130 CommandResult::message(output)
131 }
132
133 fn show_note_command(workspace: &Path, notes_path: &Path, rest: Option<&str>) -> CommandResult {
134 let notes = match read_notes(workspace, notes_path) {
135 Ok(notes) => notes,
136 Err(e) => return CommandResult::error(e),
137 };
138 let index = match parse_note_index(rest, notes.len(), "/note show <n>") {
139 Ok(index) => index,
140 Err(e) => return CommandResult::error(e),
141 };
142
143 CommandResult::message(format!("Note {}:\n\n{}", index + 1, notes[index]))
144 }
145
146 fn edit_note_command(workspace: &Path, notes_path: &Path, rest: Option<&str>) -> CommandResult {
147 let Some(rest) = rest else {
148 return CommandResult::error("Usage: /note edit <n> <text>");
149 };
150 let (index_text, new_content) = match split_command(rest) {
151 (index_text, Some(new_content)) if !new_content.trim().is_empty() => {
152 (index_text, new_content.trim())
153 }
154 _ => return CommandResult::error("Usage: /note edit <n> <text>"),
155 };
156
157 let mut notes = match read_notes(workspace, notes_path) {
158 Ok(notes) => notes,
159 Err(e) => return CommandResult::error(e),
160 };
161 let index = match parse_note_index(Some(index_text), notes.len(), "/note edit <n> <text>") {
162 Ok(index) => index,
163 Err(e) => return CommandResult::error(e),
164 };
165
166 notes[index] = new_content.to_string();
167 match write_notes(workspace, notes_path, &notes) {
168 Ok(()) => CommandResult::message(format!(
169 "Note {} updated in {}",
170 index + 1,
171 notes_path.display()
172 )),
173 Err(e) => CommandResult::error(e),
174 }
175 }
176
177 fn remove_note_command(workspace: &Path, notes_path: &Path, rest: Option<&str>) -> CommandResult {
178 let mut notes = match read_notes(workspace, notes_path) {
179 Ok(notes) => notes,
180 Err(e) => return CommandResult::error(e),
181 };
182 let index = match parse_note_index(rest, notes.len(), "/note remove <n>") {
183 Ok(index) => index,
184 Err(e) => return CommandResult::error(e),
185 };
186
187 notes.remove(index);
188 match write_notes(workspace, notes_path, &notes) {
189 Ok(()) => CommandResult::message(format!(
190 "Note {} removed from {}",
191 index + 1,
192 notes_path.display()
193 )),
194 Err(e) => CommandResult::error(e),
195 }
196 }
197
198 fn clear_notes_command(workspace: &Path, notes_path: &Path) -> CommandResult {
199 match write_notes(workspace, notes_path, &[]) {
200 Ok(()) => CommandResult::message(format!("Notes cleared in {}", notes_path.display())),
201 Err(e) => CommandResult::error(e),
202 }
203 }
204
205 fn append_note(workspace: &Path, notes_path: &Path, note_content: &str) -> Result<(), String> {
206 let mut file = match codewhale_util::fs_confined::open_append(workspace, notes_path) {
207 Ok(f) => f,
208 Err(e) => {
209 return Err(format!("Failed to open notes file: {e}"));
210 }
211 };
212
213 // Write separator and note content
214 if let Err(e) = writeln!(file, "\n---\n{note_content}") {
215 return Err(format!("Failed to write note: {e}"));
216 }
217
218 Ok(())
219 }
220
221 pub(crate) fn read_notes(workspace: &Path, notes_path: &Path) -> Result<Vec<String>, String> {
222 match codewhale_util::fs_confined::read_to_string(workspace, notes_path) {
223 Ok(content) => Ok(parse_notes(&content)),
224 Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(Vec::new()),
225 Err(e) => Err(format!("Failed to read notes file: {e}")),
226 }
227 }
228
229 fn write_notes(workspace: &Path, notes_path: &Path, notes: &[String]) -> Result<(), String> {
230 let content = notes
231 .iter()
232 .map(|note| format!("---\n{}", note.trim()))
233 .collect::<Vec<_>>()
234 .join("\n\n");
235 codewhale_util::fs_confined::write(workspace, notes_path, content.as_bytes())
236 .map_err(|e| format!("Failed to write notes file: {e}"))
237 }
238
239 fn parse_notes(content: &str) -> Vec<String> {
240 let mut notes = Vec::new();
241 let mut current = Vec::new();
242 let mut saw_separator = false;
243
244 for line in content.lines() {
245 if line.trim() == "---" {
246 if saw_separator || !current.is_empty() {
247 push_note(&mut notes, &current);
248 current.clear();
249 }
250 saw_separator = true;
251 } else if saw_separator || !line.trim().is_empty() {
252 current.push(line);
253 }
254 }
255
256 if saw_separator {
257 push_note(&mut notes, &current);
258 } else {
259 let trimmed = content.trim();
260 if !trimmed.is_empty() {
261 notes.push(trimmed.to_string());
262 }
263 }
264
265 notes
266 }
267
268 fn push_note(notes: &mut Vec<String>, lines: &[&str]) {
269 let note = lines.join("\n").trim().to_string();
270 if !note.is_empty() {
271 notes.push(note);
272 }
273 }
274
275 fn note_preview(note: &str) -> String {
276 let first_line = note
277 .lines()
278 .find_map(|line| {
279 let trimmed = line.trim();
280 (!trimmed.is_empty()).then_some(trimmed)
281 })
282 .unwrap_or("(empty note)");
283 if note.lines().filter(|line| !line.trim().is_empty()).count() > 1 {
284 format!("{first_line} ...")
285 } else {
286 first_line.to_string()
287 }
288 }
289
290 fn parse_note_index(rest: Option<&str>, note_count: usize, usage: &str) -> Result<usize, String> {
291 let Some(index_text) = rest.map(str::trim).filter(|text| !text.is_empty()) else {
292 return Err(format!("Usage: {usage}"));
293 };
294 let index = index_text
295 .parse::<usize>()
296 .map_err(|_| format!("Invalid note number: {index_text}"))?;
297 if index == 0 || index > note_count {
298 return Err(format!(
299 "Note number {index} out of range; there are {note_count} note(s)"
300 ));
301 }
302 Ok(index - 1)
303 }
304
305 pub(in crate::commands) const COMMAND_INFO: CommandInfo = CommandInfo {
306 name: "note",
307 aliases: &[],
308 usage: "/note [add|list|show|edit|remove|clear|path]",
309 description_key: "cmd_note_description",
310 };
311
312 pub(in crate::commands) struct NoteCmd;
313
314 impl RegisterCommand<CommandResult> for NoteCmd {
315 fn info() -> &'static CommandInfo {
316 &COMMAND_INFO
317 }
318
319 fn handler() -> CommandHandler<CommandResult> {
320 CommandHandler::Contextual {
321 capabilities: CommandCapabilities::WORKSPACE,
322 handler: note_contextual,
323 }
324 }
325 }
326
327 fn note_contextual(contexts: CommandContexts<'_>, arg: Option<&str>) -> CommandResult {
328 let parts = contexts.into_parts();
329 let Some(workspace) = parts.workspace.as_deref() else {
330 return CommandResult::error("Command capability unavailable: workspace");
331 };
332 note(&workspace.workspace(), arg)
333 }
334
335 #[cfg(test)]
336 mod tests {
337 use super::*;
338 use std::path::PathBuf;
339 use tempfile::TempDir;
340
341 use codewhale_command_contract::facets::CommandWorkspaceContext;
342
343 struct FakeWorkspace {
344 path: PathBuf,
345 }
346
347 impl CommandWorkspaceContext for FakeWorkspace {
348 fn effective_home_dir(&self) -> Option<std::path::PathBuf> {
349 unreachable!("navigation is not used by note")
350 }
351 fn inspect_workspace_target(
352 &self,
353 _: &std::path::Path,
354 ) -> codewhale_command_contract::navigation::WorkspaceTarget {
355 unreachable!("navigation is not used by note")
356 }
357 fn read_anchor_document(&self) -> Result<Option<String>, String> {
358 unreachable!("anchors are not used by note")
359 }
360 fn append_anchor_bytes(
361 &mut self,
362 _: &[&[u8]],
363 ) -> Result<std::path::PathBuf, codewhale_command_contract::navigation::AnchorWriteError>
364 {
365 unreachable!("anchors are not used by note")
366 }
367 fn replace_anchor_document(&mut self, _: &[u8]) -> Result<(), String> {
368 unreachable!("anchors are not used by note")
369 }
370 fn workspace(&self) -> PathBuf {
371 self.path.clone()
372 }
373
374 fn work_state_snapshot(&self) -> Result<Option<String>, String> {
375 Ok(None)
376 }
377
378 fn operation_digest(&mut self) -> Result<String, String> {
379 Ok("No active operations or to-do items.".to_string())
380 }
381 }
382
383 fn fake_workspace(tmpdir: &TempDir) -> FakeWorkspace {
384 FakeWorkspace {
385 path: tmpdir.path().to_path_buf(),
386 }
387 }
388
389 fn notes_path(tmpdir: &TempDir) -> PathBuf {
390 tmpdir.path().join(".deepseek").join("notes.md")
391 }
392
393 fn message(result: CommandResult) -> String {
394 result.message.expect("command message")
395 }
396
397 #[cfg(unix)]
398 #[test]
399 fn confined_notes_refuse_linked_files_and_directories() {
400 use std::os::unix::fs::symlink;
401
402 for directory in [".codewhale", ".deepseek"] {
403 for linked_directory in [false, true] {
404 let workspace = TempDir::new().unwrap();
405 let outside = TempDir::new().unwrap();
406 let original = "---\nfirst note\n\n---\nsecond note";
407 let target = outside.path().join("notes.md");
408 std::fs::write(&target, original).unwrap();
409 let parent = workspace.path().join(directory);
410 if linked_directory {
411 symlink(outside.path(), &parent).unwrap();
412 } else {
413 std::fs::create_dir(&parent).unwrap();
414 symlink(&target, parent.join("notes.md")).unwrap();
415 }
416 for command in [
417 "list",
418 "show 1",
419 "add next",
420 "edit 1 next",
421 "remove 1",
422 "clear",
423 ] {
424 let result = note(workspace.path(), Some(command));
425 assert!(
426 result.is_error,
427 "{directory}, {linked_directory}, {command}"
428 );
429 assert_eq!(std::fs::read_to_string(&target).unwrap(), original);
430 }
431 }
432 }
433 }
434
435 #[cfg(unix)]
436 #[test]
437 fn confined_notes_refuse_dangling_links() {
438 for directory in [".codewhale", ".deepseek"] {
439 let workspace = TempDir::new().unwrap();
440 let outside = TempDir::new().unwrap();
441 let target = outside.path().join("missing.md");
442 let parent = workspace.path().join(directory);
443 std::fs::create_dir(&parent).unwrap();
444 std::os::unix::fs::symlink(&target, parent.join("notes.md")).unwrap();
445 for command in ["list", "add next", "clear"] {
446 assert!(note(workspace.path(), Some(command)).is_error);
447 assert!(!target.exists());
448 }
449 if directory == ".codewhale" {
450 assert!(!workspace.path().join(".deepseek").exists());
451 }
452 }
453 }
454
455 #[test]
456 fn test_note_without_content_returns_error() {
457 let tmpdir = TempDir::new().unwrap();
458 let workspace = fake_workspace(&tmpdir);
459 let result = note(&workspace.path, None);
460 assert!(result.message.is_some());
461 assert!(result.message.unwrap().contains("Usage: /note"));
462 }
463
464 #[test]
465 fn test_note_with_empty_content_returns_error() {
466 let tmpdir = TempDir::new().unwrap();
467 let workspace = fake_workspace(&tmpdir);
468 let result = note(&workspace.path, Some(" "));
469 assert!(result.message.is_some());
470 assert!(result.message.unwrap().contains("cannot be empty"));
471 }
472
473 #[test]
474 fn test_note_appends_to_file() {
475 let tmpdir = TempDir::new().unwrap();
476 let workspace = fake_workspace(&tmpdir);
477 let result = note(&workspace.path, Some("Test note content"));
478 assert!(result.message.is_some());
479 let msg = message(result);
480 assert!(msg.contains("Note appended to"));
481
482 let notes_path = notes_path(&tmpdir);
483 assert!(notes_path.exists());
484 let content = std::fs::read_to_string(&notes_path).unwrap();
485 assert!(content.contains("Test note content"));
486 }
487
488 #[test]
489 fn test_note_multiple_appends() {
490 let tmpdir = TempDir::new().unwrap();
491 let workspace = fake_workspace(&tmpdir);
492 note(&workspace.path, Some("First note"));
493 note(&workspace.path, Some("Second note"));
494
495 let notes_path = notes_path(&tmpdir);
496 let content = std::fs::read_to_string(&notes_path).unwrap();
497 assert!(content.contains("First note"));
498 assert!(content.contains("Second note"));
499 // Should have two separators
500 assert_eq!(content.matches("---").count(), 2);
501 }
502
503 #[test]
504 fn test_note_list_numbers_entries_without_storing_numbers() {
505 let tmpdir = TempDir::new().unwrap();
506 let workspace = fake_workspace(&tmpdir);
507 note(&workspace.path, Some("Alpha note"));
508 note(&workspace.path, Some("Beta note"));
509
510 let listed = message(note(&workspace.path, Some("list")));
511 assert!(listed.contains("1. Alpha note"));
512 assert!(listed.contains("2. Beta note"));
513
514 let content = std::fs::read_to_string(notes_path(&tmpdir)).unwrap();
515 assert!(content.contains("Alpha note"));
516 assert!(!content.contains("1. Alpha note"));
517 }
518
519 #[test]
520 fn test_note_show_displays_full_multiline_note() {
521 let tmpdir = TempDir::new().unwrap();
522 let workspace = fake_workspace(&tmpdir);
523 note(&workspace.path, Some("add first line\nsecond line"));
524
525 let shown = message(note(&workspace.path, Some("show 1")));
526 assert!(shown.contains("Note 1:"));
527 assert!(shown.contains("first line\nsecond line"));
528 }
529
530 #[test]
531 fn test_note_edit_updates_numbered_entry() {
532 let tmpdir = TempDir::new().unwrap();
533 let workspace = fake_workspace(&tmpdir);
534 note(&workspace.path, Some("First note"));
535 note(&workspace.path, Some("Second note"));
536
537 let edited = message(note(&workspace.path, Some("edit 2 Updated second note")));
538 assert!(edited.contains("Note 2 updated"));
539
540 let content = std::fs::read_to_string(notes_path(&tmpdir)).unwrap();
541 assert!(content.contains("First note"));
542 assert!(content.contains("Updated second note"));
543 assert!(!content.contains("Second note"));
544 }
545
546 #[test]
547 fn test_note_remove_renumbers_remaining_entries() {
548 let tmpdir = TempDir::new().unwrap();
549 let workspace = fake_workspace(&tmpdir);
550 note(&workspace.path, Some("First note"));
551 note(&workspace.path, Some("Second note"));
552 note(&workspace.path, Some("Third note"));
553
554 let removed = message(note(&workspace.path, Some("remove 2")));
555 assert!(removed.contains("Note 2 removed"));
556
557 let listed = message(note(&workspace.path, Some("list")));
558 assert!(listed.contains("1. First note"));
559 assert!(listed.contains("2. Third note"));
560 assert!(!listed.contains("Second note"));
561 }
562
563 #[cfg(unix)]
564 #[test]
565 fn note_commands_refuse_notes_that_leave_the_workspace() {
566 let tmpdir = TempDir::new().unwrap();
567 let outside = TempDir::new().unwrap();
568 let rc = outside.path().join("zshrc");
569 std::fs::write(&rc, "export PATH=keep\n").unwrap();
570 std::fs::create_dir_all(tmpdir.path().join(".deepseek")).unwrap();
571 std::os::unix::fs::symlink(&rc, notes_path(&tmpdir)).unwrap();
572 for command in ["clear", "remove 1", "edit 1 x", "list", "hello"] {
573 let result = note(tmpdir.path(), Some(command));
574 assert!(result.is_error, "/note {command} must be refused");
575 }
576 assert_eq!(std::fs::read_to_string(&rc).unwrap(), "export PATH=keep\n");
577
578 let linked = TempDir::new().unwrap();
579 std::os::unix::fs::symlink(outside.path(), linked.path().join(".deepseek")).unwrap();
580 assert!(note(linked.path(), Some("clear")).is_error);
581 assert!(!outside.path().join("notes.md").exists());
582 }
583
584 #[test]
585 fn test_note_clear_empties_file() {
586 let tmpdir = TempDir::new().unwrap();
587 let workspace = fake_workspace(&tmpdir);
588 note(&workspace.path, Some("First note"));
589
590 let cleared = message(note(&workspace.path, Some("clear")));
591 assert!(cleared.contains("Notes cleared"));
592 assert_eq!(std::fs::read_to_string(notes_path(&tmpdir)).unwrap(), "");
593 }
594
595 #[test]
596 fn test_note_path_prints_workspace_notes_file() {
597 let tmpdir = TempDir::new().unwrap();
598 let workspace = fake_workspace(&tmpdir);
599
600 let path = message(note(&workspace.path, Some("path")));
601 assert!(path.contains(".deepseek"));
602 assert!(path.contains("notes.md"));
603 }
604
605 #[test]
606 fn test_note_prefers_existing_codewhale_notes_file() {
607 let tmpdir = TempDir::new().unwrap();
608 let codewhale_dir = tmpdir.path().join(".codewhale");
609 std::fs::create_dir_all(&codewhale_dir).unwrap();
610 let codewhale_notes = codewhale_dir.join("notes.md");
611 std::fs::write(&codewhale_notes, "---\nexisting codewhale note").unwrap();
612
613 let workspace = fake_workspace(&tmpdir);
614 let path = message(note(&workspace.path, Some("path")));
615 assert!(path.contains(".codewhale"));
616 assert!(path.contains("notes.md"));
617 assert!(!path.contains(".deepseek"));
618 }
619
620 #[test]
621 fn test_note_rejects_out_of_range_index() {
622 let tmpdir = TempDir::new().unwrap();
623 let workspace = fake_workspace(&tmpdir);
624 note(&workspace.path, Some("Only note"));
625
626 let result = note(&workspace.path, Some("show 2"));
627 assert!(result.message.unwrap().contains("out of range"));
628 }
629
630 #[test]
631 fn test_parse_notes_handles_plain_text_before_separator() {
632 let parsed = parse_notes("plain note\n---\nseparated note");
633 assert_eq!(parsed, vec!["plain note", "separated note"]);
634 }
635
636 #[test]
637 fn note_registration_declares_exactly_workspace() {
638 let CommandHandler::Contextual {
639 capabilities,
640 handler,
641 } = NoteCmd::handler()
642 else {
643 panic!("note must be contextual");
644 };
645 assert_eq!(capabilities, CommandCapabilities::WORKSPACE);
646 assert!(!capabilities.contains(CommandCapabilities::MEMORY));
647 assert!(!capabilities.contains(CommandCapabilities::PRESENTATION));
648 assert!(!capabilities.contains(CommandCapabilities::MEDIA));
649
650 // Missing WORKSPACE fails safely instead of panicking.
651 let missing = handler(CommandContexts::empty(), Some("list"));
652 assert!(missing.is_error);
653 assert_eq!(
654 missing.message.as_deref(),
655 Some("Error: Command capability unavailable: workspace")
656 );
657 assert_eq!(NoteCmd::info().description_key, "cmd_note_description");
658 assert_eq!(NoteCmd::info().name, "note");
659 assert_eq!(NoteCmd::info().aliases, &[] as &[&str]);
660 }
661 }
662
662 lines RUST