config: fix test compile error
This commit is contained in:
parent
9904717c71
commit
5a822eda32
2 changed files with 4 additions and 3 deletions
|
|
@ -3,7 +3,7 @@ macro_rules! config {
|
||||||
($f:path) => {
|
($f:path) => {
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
#[used]
|
#[used]
|
||||||
pub static mut JAY_CONFIG_ENTRY: $crate::_private::ConfigEntry = {
|
pub static mut JAY_CONFIG_ENTRY_V1: $crate::_private::ConfigEntry = {
|
||||||
struct X;
|
struct X;
|
||||||
impl $crate::_private::Config for X {
|
impl $crate::_private::Config for X {
|
||||||
extern "C" fn configure() {
|
extern "C" fn configure() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ use {
|
||||||
backend::{ConnectorId, InputDeviceId},
|
backend::{ConnectorId, InputDeviceId},
|
||||||
config::handler::ConfigProxyHandler,
|
config::handler::ConfigProxyHandler,
|
||||||
ifs::wl_seat::SeatId,
|
ifs::wl_seat::SeatId,
|
||||||
it::test_config::TEST_CONFIG_ENTRY,
|
|
||||||
state::State,
|
state::State,
|
||||||
utils::{
|
utils::{
|
||||||
clonecell::CloneCell, numcell::NumCell, oserror::OsError, ptr_ext::PtrExt,
|
clonecell::CloneCell, numcell::NumCell, oserror::OsError, ptr_ext::PtrExt,
|
||||||
|
|
@ -26,6 +25,8 @@ use {
|
||||||
std::{cell::Cell, mem, ptr, rc::Rc},
|
std::{cell::Cell, mem, ptr, rc::Rc},
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
#[cfg(feature = "it")]
|
||||||
|
use crate::it::test_config::TEST_CONFIG_ENTRY;
|
||||||
|
|
||||||
#[derive(Debug, Error)]
|
#[derive(Debug, Error)]
|
||||||
pub enum ConfigError {
|
pub enum ConfigError {
|
||||||
|
|
@ -231,7 +232,7 @@ impl ConfigProxy {
|
||||||
Ok(l) => l,
|
Ok(l) => l,
|
||||||
Err(e) => return Err(ConfigError::CouldNotLoadLibrary(e)),
|
Err(e) => return Err(ConfigError::CouldNotLoadLibrary(e)),
|
||||||
};
|
};
|
||||||
let entry = lib.get::<&'static ConfigEntry>(b"JAY_CONFIG_ENTRY\0");
|
let entry = lib.get::<&'static ConfigEntry>(b"JAY_CONFIG_ENTRY_V1\0");
|
||||||
let entry = match entry {
|
let entry = match entry {
|
||||||
Ok(e) => *e,
|
Ok(e) => *e,
|
||||||
Err(e) => return Err(ConfigError::LibraryDoesNotContainEntry(e)),
|
Err(e) => return Err(ConfigError::LibraryDoesNotContainEntry(e)),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue