17 lines · 560 B · Rust
RawDownload
use gix_attributes::{AssignmentRef, NameRef, StateRef}; #[test]fn display() {    assert_eq!(adisplay("hello", StateRef::Unspecified), "!hello");    assert_eq!(adisplay("hello", StateRef::Unset), "-hello");    assert_eq!(adisplay("hello", StateRef::Set), "hello");    assert_eq!(adisplay("hello", StateRef::Value("value".into())), "hello=value");} fn adisplay(name: &str, state: StateRef<'_>) -> String {    AssignmentRef {        name: NameRef::try_from(bstr::BStr::new(name.as_bytes())).expect("valid name"),        state,    }    .to_string()}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t