match ext {
FeedExtend::Initial => {
self.feeds.insert(id.clone(), Feed {
- ids: ids,
+ ids,
origin: 0,
});
}
assert_eq!(text.chars().count(), colour.chars().count(),
"Mismatched lengths in ColouredStringSlice::general");
ColouredStringSlice {
- text: text,
- colour: colour,
+ text,
+ colour,
}
}
pub fn split(&'a self, width: usize) -> ColouredStringSplitIterator<'a> {
ColouredStringSplitIterator {
cs: self.clone(),
- width: width,
+ width,
textpos: 0,
colourpos: 0,
delivered_empty: false,
pub fn split(&'a self, width: usize) -> ColouredStringSplitIterator<'a> {
ColouredStringSplitIterator {
cs: self.slice(),
- width: width,
+ width,
textpos: 0,
colourpos: 0,
delivered_empty: false,
dir.push("mastodonochrome");
Ok(ConfigLocation {
- dir: dir,
+ dir,
})
}
pub fn from_pathbuf(dir: PathBuf) -> Self {
ConfigLocation {
- dir: dir,
+ dir,
}
}
{
let promptwidth = prompt.width();
BottomLineEditorOverlay {
- prompt: prompt,
+ prompt,
promptwidth,
ed: SingleLineEditor::new(),
- result: result,
+ result,
}
}
}
};
let mut contents = FileContents {
- source: source,
+ source,
header: FileHeader::new(desc),
extender,
origin: 0,
let initial_pos = FilePosition::Coarse(contents.last_index() as isize);
let ff = File {
- contents: contents,
+ contents,
rendered: HashMap::new(),
pos: initial_pos,
last_size: None,
impl FileHeader {
pub fn new(text: ColouredString) -> Self {
FileHeader{
- text: text,
+ text,
}
}
}
}
NotificationLog {
- timestamp: timestamp,
+ timestamp,
account_desc: format!("{} ({})", nameline, account),
- para: para,
+ para,
}
}
pub fn add(mut self, key: OurKey, description: &str,
priority: usize) -> Self {
self.keypresses.push((Keypress {
- key: key,
+ key,
description: ColouredString::plain(description)
}, priority));
self
let rwid = description.width();
MenuKeypressLine {
keypress: Keypress {
- key: key,
- description: description,
+ key,
+ description,
},
- lwid: lwid,
+ lwid,
lmaxwid: lwid,
rmaxwid: rwid,
}
}).collect();
StatusDisplay {
- sep: sep,
- from: from,
- via: via,
- irt: irt,
- content: content,
- media: media,
+ sep,
+ from,
+ via,
+ irt,
+ content,
+ media,
blank: BlankLine::new(),
}
}
terminal.clear()?;
let mut tui = Tui {
- terminal: terminal,
+ terminal,
subthread_sender: sender,
subthread_receiver: receiver,
state: TuiLogicalState::new(),
- client: client,
+ client,
};
let result = tui.run_inner();
let activity_state = main_menu();
TuiLogicalState {
- activity_stack: activity_stack,
- activity_state: activity_state,
+ activity_stack,
+ activity_state,
overlay_activity_state: None,
last_area: None,
}