Skip to content

Commit 83bb13a

Browse files
committed
sys/dtx: Move device path to constant
1 parent 0bb5878 commit 83bb13a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sys/dtx.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,10 @@ pub struct Device {
246246
}
247247

248248
impl Device {
249+
const DEFAULT_DEVICE_FILE_PATH: &'static str = "/dev/surface/dtx";
250+
249251
pub fn open() -> Result<Self> {
250-
Device::open_path("/dev/surface/dtx")
252+
Device::open_path(Device::DEFAULT_DEVICE_FILE_PATH)
251253
}
252254

253255
pub fn open_path<P: AsRef<Path>>(path: P) -> Result<Self> {

0 commit comments

Comments
 (0)