Make example runnable as example
Trying to run examples as usual (and as described in the README) fails:
> cargo run --release --example cosmic
error: no example target named `cosmic`.
The examples themselves are written as separate crates, and are
therefore not usable as examples (they also won't build via `cargo build
--examples`).
This commit makes the example fit the style that cargo can understand.
That is:
- Don't declare the example as a separate crate.
- Remove the nested `src` inside the example directory.
- Put example-only dependencies in dev-dependencies
No rust code was modified, files were only moved.
This commit is contained in:
parent
e3ec7e3b7d
commit
6ce9f4fc7a
12 changed files with 3 additions and 14 deletions
|
|
@ -1,43 +0,0 @@
|
|||
use super::{Page, SubPage};
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub enum NetworkingPage {
|
||||
Wired,
|
||||
OnlineAccounts,
|
||||
}
|
||||
|
||||
impl SubPage for NetworkingPage {
|
||||
//TODO: translate
|
||||
fn title(&self) -> &'static str {
|
||||
use NetworkingPage::*;
|
||||
match self {
|
||||
Wired => "Wired",
|
||||
OnlineAccounts => "Online Accounts",
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: translate
|
||||
fn description(&self) -> &'static str {
|
||||
use NetworkingPage::*;
|
||||
match self {
|
||||
Wired => "Wired connection, connection profiles",
|
||||
OnlineAccounts => "Add accounts, IMAP and SMTP, enterprise logins",
|
||||
}
|
||||
}
|
||||
|
||||
fn icon_name(&self) -> &'static str {
|
||||
use NetworkingPage::*;
|
||||
match self {
|
||||
Wired => "network-workgroup-symbolic",
|
||||
OnlineAccounts => "goa-panel-symbolic", //TODO: new icon
|
||||
}
|
||||
}
|
||||
|
||||
fn parent_page(&self) -> Page {
|
||||
Page::Networking(None)
|
||||
}
|
||||
|
||||
fn into_page(self) -> Page {
|
||||
Page::Networking(Some(self))
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue