forked from AbleOS/ableos
chore: cargo fmt
This commit is contained in:
parent
f801eea0aa
commit
983550ae54
|
@ -175,10 +175,10 @@ unsafe fn pci_config_read(bus: u8, device: u8, func: u8, offset: u8) -> u32 {
|
||||||
((bus << 16) | (device << 11) | (func << 8) | (offset & 0xfc) | 0x80000000) as u32;
|
((bus << 16) | (device << 11) | (func << 8) | (offset & 0xfc) | 0x80000000) as u32;
|
||||||
|
|
||||||
// write address
|
// write address
|
||||||
Port::<u32>::new(0xCF8).write(address);
|
Port::<u32>::new(0xCF8).write(address);
|
||||||
|
|
||||||
// read data
|
// read data
|
||||||
Port::<u32>::new(0xCFC).read()
|
Port::<u32>::new(0xCFC).read()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
|
@ -192,11 +192,10 @@ unsafe fn pci_config_write(bus: u8, device: u8, func: u8, offset: u8, value: u32
|
||||||
((bus << 16) | (device << 11) | (func << 8) | (offset & 0xfc) | 0x80000000) as u32;
|
((bus << 16) | (device << 11) | (func << 8) | (offset & 0xfc) | 0x80000000) as u32;
|
||||||
|
|
||||||
// write address
|
// write address
|
||||||
Port::<u32>::new(0xCF8).write(address);
|
Port::<u32>::new(0xCF8).write(address);
|
||||||
|
|
||||||
// write data
|
// write data
|
||||||
Port::<u32>::new(0xCFC).write(value);
|
Port::<u32>::new(0xCFC).write(value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_header_type(bus: u8, device: u8, function: u8) -> u8 {
|
fn get_header_type(bus: u8, device: u8, function: u8) -> u8 {
|
||||||
|
|
|
@ -174,7 +174,7 @@ pub fn command_parser(user: String, command: String) {
|
||||||
options.read(true);
|
options.read(true);
|
||||||
let file = {
|
let file = {
|
||||||
let path = format!("/home/{user}/bins/{bin_name}.wasm");
|
let path = format!("/home/{user}/bins/{bin_name}.wasm");
|
||||||
if let Ok(file ) = fs.open(&path.as_bytes(), &options) {
|
if let Ok(file) = fs.open(&path.as_bytes(), &options) {
|
||||||
file
|
file
|
||||||
} else {
|
} else {
|
||||||
let path = format!("/shared/bins/{bin_name}.wasm");
|
let path = format!("/shared/bins/{bin_name}.wasm");
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#![cfg(feature="image")]
|
#![cfg(feature = "image")]
|
||||||
|
|
||||||
use crate::render::{Canvas, Pixel};
|
use crate::render::{Canvas, Pixel};
|
||||||
use crate::types::Color;
|
use crate::types::Color;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
//! let svg_xml = code.render::<svg::Color>().build();
|
//! let svg_xml = code.render::<svg::Color>().build();
|
||||||
//! println!("{}", svg_xml);
|
//! println!("{}", svg_xml);
|
||||||
|
|
||||||
#![cfg(feature="svg")]
|
#![cfg(feature = "svg")]
|
||||||
|
|
||||||
use std::fmt::Write;
|
use std::fmt::Write;
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
Loading…
Reference in a new issue