Implement os_name
, os_version
and app_version
for TestPlatform
Co-Authored-By: Conrad Irwin <conrad.irwin@gmail.com> Co-Authored-By: Kyle <kyle@zed.dev>
This commit is contained in:
parent
52f9f90ccb
commit
1b75603f63
1 changed files with 11 additions and 15 deletions
|
@ -1,4 +1,5 @@
|
||||||
use crate::{DisplayId, Executor, Platform, PlatformTextSystem};
|
use crate::{DisplayId, Executor, Platform, PlatformTextSystem};
|
||||||
|
use anyhow::{anyhow, Result};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
pub struct TestPlatform {
|
pub struct TestPlatform {
|
||||||
|
@ -132,18 +133,18 @@ impl Platform for TestPlatform {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn os_name(&self) -> &'static str {
|
fn os_name(&self) -> &'static str {
|
||||||
unimplemented!()
|
"test"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn os_version(&self) -> anyhow::Result<crate::SemanticVersion> {
|
fn os_version(&self) -> Result<crate::SemanticVersion> {
|
||||||
unimplemented!()
|
Err(anyhow!("os_version called on TestPlatform"))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn app_version(&self) -> anyhow::Result<crate::SemanticVersion> {
|
fn app_version(&self) -> Result<crate::SemanticVersion> {
|
||||||
unimplemented!()
|
Err(anyhow!("app_version called on TestPlatform"))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn app_path(&self) -> anyhow::Result<std::path::PathBuf> {
|
fn app_path(&self) -> Result<std::path::PathBuf> {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +152,7 @@ impl Platform for TestPlatform {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn path_for_auxiliary_executable(&self, _name: &str) -> anyhow::Result<std::path::PathBuf> {
|
fn path_for_auxiliary_executable(&self, _name: &str) -> Result<std::path::PathBuf> {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,20 +172,15 @@ impl Platform for TestPlatform {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write_credentials(
|
fn write_credentials(&self, _url: &str, _username: &str, _password: &[u8]) -> Result<()> {
|
||||||
&self,
|
|
||||||
_url: &str,
|
|
||||||
_username: &str,
|
|
||||||
_password: &[u8],
|
|
||||||
) -> anyhow::Result<()> {
|
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn read_credentials(&self, _url: &str) -> anyhow::Result<Option<(String, Vec<u8>)>> {
|
fn read_credentials(&self, _url: &str) -> Result<Option<(String, Vec<u8>)>> {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn delete_credentials(&self, _url: &str) -> anyhow::Result<()> {
|
fn delete_credentials(&self, _url: &str) -> Result<()> {
|
||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue