put the borrow in the right place :-/

This commit is contained in:
bunnie 2021-04-04 02:17:14 +08:00
parent da7ace04d4
commit 659b050c0e
2 changed files with 2 additions and 2 deletions

View file

@ -16,7 +16,7 @@ pub struct Gfx {
conn: xous::CID,
}
impl Gfx {
pub fn new(&xns: xous_names::XousNames) -> Result<Self, xous::Error> {
pub fn new(xns: &xous_names::XousNames) -> Result<Self, xous::Error> {
let conn = xns.request_connection_blocking(api::SERVER_NAME_GFX).expect("Can't connect to GFX");
Ok(Gfx {
conn,

View file

@ -8,7 +8,7 @@ pub struct Trng {
conn: CID,
}
impl Trng {
pub fn new(&xns: xous_names::XousNames) -> Result<Self, xous::Error> {
pub fn new(xns: &xous_names::XousNames) -> Result<Self, xous::Error> {
let conn = xns.request_connection_blocking(api::SERVER_NAME_TRNG).expect("Can't connect to TRNG server");
Ok(Trng {
conn