From 794b7e0395e8ff3127a31224d169f983771c7eee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rom=C3=A1n=20C=C3=A1rdenas=20Rodr=C3=ADguez?= Date: Sat, 18 May 2024 11:25:39 +0200 Subject: [PATCH] fix mstatus tests --- riscv/src/register/mstatus.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/riscv/src/register/mstatus.rs b/riscv/src/register/mstatus.rs index e01388a9..5aadc33a 100644 --- a/riscv/src/register/mstatus.rs +++ b/riscv/src/register/mstatus.rs @@ -602,11 +602,11 @@ mod test { #[test] fn test_mpp() { let mut mstatus = Mstatus { bits: 0 }; - mstatus = mstatus.set_mpp(MPP::User); + mstatus.set_mpp(MPP::User); assert_eq!(mstatus.mpp(), MPP::User); - mstatus = mstatus.set_mpp(MPP::Machine); + mstatus.set_mpp(MPP::Machine); assert_eq!(mstatus.mpp(), MPP::Machine); - mstatus = mstatus.set_mpp(MPP::Supervisor); + mstatus.set_mpp(MPP::Supervisor); assert_eq!(mstatus.mpp(), MPP::Supervisor); } }