mirror of
https://github.com/ankitects/anki.git
synced 2026-01-15 14:59:00 -05:00
* Run cargo +nightly fmt * Latest prost-build includes clippy workaround * Tweak Rust protobuf imports - Avoid use of stringify!(), as JetBrains editors get confused by it - Stop merging all protobuf symbols into a single namespace * Remove some unnecessary qualifications Found via IntelliJ lint * Migrate some asserts to assert_eq/ne * Remove mention of node_modules exclusion This no longer seems to be necessary after migrating away from Bazel, and excluding it means TS/Svelte files can't be edited properly.
15 lines
565 B
Rust
15 lines
565 B
Rust
// Copyright: Ankitects Pty Ltd and contributors
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
use super::Backend;
|
|
pub(super) use crate::pb::links::links_service::Service as LinksService;
|
|
use crate::{pb, pb::links::help_page_link_request::HelpPage, prelude::*};
|
|
|
|
impl LinksService for Backend {
|
|
fn help_page_link(&self, input: pb::links::HelpPageLinkRequest) -> Result<pb::generic::String> {
|
|
Ok(HelpPage::from_i32(input.page)
|
|
.unwrap_or(HelpPage::Index)
|
|
.to_link()
|
|
.into())
|
|
}
|
|
}
|