From a819f93fa9394aa7a3ddb9ac1fe0095e376789e9 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 2 Aug 2024 13:45:10 -0700 Subject: [PATCH] const opportunity --- src/instruction.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/instruction.rs b/src/instruction.rs index 08a27bb..df07598 100644 --- a/src/instruction.rs +++ b/src/instruction.rs @@ -19,14 +19,14 @@ pub struct InstructionCollector{ instruction:Option, } impl InstructionCollector{ - pub fn new(time:Time)->Self{ + pub const fn new(time:Time)->Self{ Self{ time, instruction:None } } #[inline] - pub fn time(&self)->Time{ + pub const fn time(&self)->Time{ self.time } pub fn collect(&mut self,instruction:Option>){ @@ -50,4 +50,4 @@ impl InstructionCollector{ None=>None, } } -} \ No newline at end of file +}