MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / added

Function added

atomic-cli/src/output/colors.rs:276–278  ·  view source on GitHub ↗

Format added content in green. Use this for newly added files, lines, or content. # Arguments `text` - The text to format # Returns A styled object that displays in green when printed. # Example ```rust,ignore println!("{} {}", colors::added("+"), colors::added("new line")); ```

(text: D)

Source from the content-addressed store, hash-verified

274/// println!("{} {}", colors::added("+"), colors::added("new line"));
275/// ```
276pub fn added<D: std::fmt::Display>(text: D) -> StyledObject<D> {
277 style(text).green()
278}
279
280/// Format deleted content in red.
281///

Callers 15

write_commitMethod · 0.85
runMethod · 0.85
print_unifiedMethod · 0.85
print_name_statusMethod · 0.85
build_hunks_from_diffFunction · 0.85
test_diff_hunk_add_lineFunction · 0.85
test_hunk_line_addedFunction · 0.85
test_hunk_line_displayFunction · 0.85
test_file_diff_addedFunction · 0.85

Calls

no outgoing calls

Tested by 15

test_diff_hunk_add_lineFunction · 0.68
test_hunk_line_addedFunction · 0.68
test_hunk_line_displayFunction · 0.68
test_file_diff_addedFunction · 0.68
test_hunk_line_cloneFunction · 0.68
test_hunk_line_debugFunction · 0.68