mirror of
https://git.meli.delivery/meli/meli
synced 2024-11-17 03:26:20 +00:00
components.rs: remove unused Component::set_id method
This commit is contained in:
parent
96537e48c5
commit
155fb41b93
@ -153,8 +153,6 @@ pub trait Component: Display + Debug + Send + Sync {
|
||||
|
||||
fn kill(&mut self, _id: ComponentId, _context: &mut Context) {}
|
||||
|
||||
fn set_id(&mut self, _id: ComponentId) {}
|
||||
|
||||
fn id(&self) -> ComponentId;
|
||||
|
||||
fn shortcuts(&self, _context: &Context) -> ShortcutMaps {
|
||||
|
@ -268,10 +268,6 @@ impl Component for ContactManager {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
|
||||
fn can_quit_cleanly(&mut self, context: &Context) -> bool {
|
||||
if !self.has_changes {
|
||||
return true;
|
||||
|
@ -955,10 +955,6 @@ impl Component for ContactList {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
|
||||
fn can_quit_cleanly(&mut self, context: &Context) -> bool {
|
||||
self.view
|
||||
.as_mut()
|
||||
|
@ -2138,9 +2138,6 @@ impl Component for Composer {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
|
||||
fn can_quit_cleanly(&mut self, context: &Context) -> bool {
|
||||
if !self.has_changes {
|
||||
|
@ -300,8 +300,4 @@ impl Component for EditAttachmentsRefMut<'_, '_> {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.inner.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, new_id: ComponentId) {
|
||||
self.inner.id = new_id;
|
||||
}
|
||||
}
|
||||
|
@ -250,17 +250,6 @@ impl Component for KeySelection {
|
||||
KeySelection::Loaded { ref widget, .. } => widget.id(),
|
||||
}
|
||||
}
|
||||
|
||||
fn set_id(&mut self, new_id: ComponentId) {
|
||||
match self {
|
||||
KeySelection::LoadingKeys {
|
||||
ref mut progress_spinner,
|
||||
..
|
||||
} => progress_spinner.set_id(new_id),
|
||||
KeySelection::Error { ref mut id, .. } => *id = new_id,
|
||||
KeySelection::Loaded { ref mut widget, .. } => widget.set_id(new_id),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
@ -1981,9 +1981,6 @@ impl Component for Listing {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.component.id()
|
||||
}
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.component.set_id(id);
|
||||
}
|
||||
|
||||
fn status(&self, context: &Context) -> String {
|
||||
let mailbox_hash = match self.cursor_pos.1 {
|
||||
|
@ -2041,7 +2041,4 @@ impl Component for CompactListing {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
@ -1563,7 +1563,4 @@ impl Component for ConversationsListing {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
@ -234,8 +234,4 @@ impl Component for OfflineListing {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
@ -1612,7 +1612,4 @@ impl Component for PlainListing {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
@ -1580,7 +1580,4 @@ impl Component for ThreadListing {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
@ -467,8 +467,4 @@ impl Component for AccountStatus {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
@ -2909,10 +2909,6 @@ impl Component for MailView {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
|
||||
fn kill(&mut self, id: ComponentId, context: &mut Context) {
|
||||
if self.id == id {
|
||||
context
|
||||
|
@ -638,8 +638,4 @@ impl Component for EnvelopeView {
|
||||
.replies
|
||||
.push_back(UIEvent::Action(Tab(Kill(self.id))));
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
@ -209,8 +209,4 @@ impl Component for HtmlView {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
@ -1172,10 +1172,6 @@ impl Component for ThreadView {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
|
||||
fn kill(&mut self, id: ComponentId, context: &mut Context) {
|
||||
debug_assert!(self.id == id);
|
||||
context
|
||||
|
@ -542,10 +542,6 @@ impl Component for MailboxManager {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
|
||||
fn can_quit_cleanly(&mut self, _context: &Context) -> bool {
|
||||
true
|
||||
}
|
||||
|
@ -135,10 +135,6 @@ mod dbus {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
fn escape_str(s: &str) -> String {
|
||||
@ -286,10 +282,6 @@ impl Component for NotificationCommand {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
fn update_xbiff(path: &str) -> Result<()> {
|
||||
|
@ -446,10 +446,6 @@ impl Component for SVGScreenshotFilter {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
const CSS_STYLE: &str = r#"#t{font-family:'DejaVu Sans Mono',monospace;font-style:normal;font-size:14px;} text {dominant-baseline: text-before-edge; white-space: pre;} .f{fill:#e5e5e5;} .b{fill:#000;} .c0 {fill:#000;} .c1 {fill:#cd0000;} .c2 {fill:#00cd00;} .c3 {fill:#cdcd00;} .c4 {fill:#00e;} .c5 {fill:#cd00cd;} .c6 {fill:#00cdcd;} .c7 {fill:#e5e5e5;} .c8 {fill:#7f7f7f;} .c9 {fill:#f00;} .c10 {fill:#0f0;} .c11 {fill:#ff0;} .c12 {fill:#5c5cff;} .c13 {fill:#f0f;} .c14 {fill:#0ff;} .c15 {fill:#fff;}"#;
|
||||
|
@ -791,9 +791,6 @@ impl Component for StatusBar {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
|
||||
fn can_quit_cleanly(&mut self, context: &Context) -> bool {
|
||||
self.container.can_quit_cleanly(context)
|
||||
@ -1539,10 +1536,6 @@ impl Component for Tabbed {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
|
||||
fn shortcuts(&self, context: &Context) -> ShortcutMaps {
|
||||
let mut map = ShortcutMaps::default();
|
||||
map.insert(
|
||||
@ -1645,10 +1638,6 @@ impl Component for RawBuffer {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
impl RawBuffer {
|
||||
|
@ -424,9 +424,6 @@ impl<T: 'static + PartialEq + Debug + Clone + Sync + Send> Component for UIDialo
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
impl Component for UIConfirmationDialog {
|
||||
@ -753,10 +750,6 @@ impl Component for UIConfirmationDialog {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: PartialEq + Debug + Clone + Sync + Send, F: 'static + Sync + Send> Selector<T, F> {
|
||||
|
@ -110,9 +110,6 @@ impl Component for HSplit {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
/// A vertically split in half container.
|
||||
@ -250,7 +247,4 @@ impl Component for VSplit {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
@ -845,8 +845,4 @@ impl Component for Pager {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
@ -318,10 +318,6 @@ impl Component for TextField {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for TextField {
|
||||
|
@ -179,13 +179,6 @@ impl Component for Field {
|
||||
Self::Choice(_, _, i) => *i,
|
||||
}
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
match self {
|
||||
Self::Text(ref mut i) => i.set_id(id),
|
||||
Self::Choice(_, _, i) => *i = id,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Field {
|
||||
@ -535,9 +528,6 @@ impl<T: 'static + std::fmt::Debug + Copy + Default + Send + Sync> Component for
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
@ -675,9 +665,6 @@ where
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
@ -811,9 +798,6 @@ impl Component for AutoComplete {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
impl AutoComplete {
|
||||
@ -1260,8 +1244,4 @@ impl Component for ProgressSpinner {
|
||||
fn id(&self) -> ComponentId {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: ComponentId) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user