From bead03e8589962bd6e0e84a0357eff3b5fb49e4f Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 17 Jan 2020 18:54:38 -0700 Subject: [PATCH] drop plus_one test --- proto/backend.proto | 4 ---- pylib/anki/rsbackend.py | 5 ----- pylib/anki/storage.py | 3 --- rslib/src/backend.rs | 6 ------ 4 files changed, 18 deletions(-) diff --git a/proto/backend.proto b/proto/backend.proto index 598d7ec89..38e070ceb 100644 --- a/proto/backend.proto +++ b/proto/backend.proto @@ -16,8 +16,6 @@ message BackendInput { BrowserRowsIn browser_rows = 20; RenderCardIn render_card = 21; int64 local_minutes_west = 22; - - PlusOneIn plus_one = 2046; // temporary, for testing } } @@ -31,8 +29,6 @@ message BackendOutput { RenderCardOut render_card = 21; sint32 local_minutes_west = 22; - PlusOneOut plus_one = 2046; // temporary, for testing - BackendError error = 2047; } } diff --git a/pylib/anki/rsbackend.py b/pylib/anki/rsbackend.py index 31ce5ca7d..8cf741a3b 100644 --- a/pylib/anki/rsbackend.py +++ b/pylib/anki/rsbackend.py @@ -88,11 +88,6 @@ class RustBackend: else: return output - def plus_one(self, num: int) -> int: - input = pb.BackendInput(plus_one=pb.PlusOneIn(num=num)) - output = self._run_command(input) - return output.plus_one.num - def template_requirements( self, template_fronts: List[str], field_map: Dict[str, int] ) -> AllTemplateReqs: diff --git a/pylib/anki/storage.py b/pylib/anki/storage.py index 619853a4b..b3099780e 100644 --- a/pylib/anki/storage.py +++ b/pylib/anki/storage.py @@ -31,9 +31,6 @@ def Collection( ) -> _Collection: "Open a new or existing collection. Path must be unicode." backend = RustBackend(path) - # fixme: this call is temporarily here to ensure the brige is working - # on all platforms, and should be removed in a future beta - assert backend.plus_one(5) == 6 assert path.endswith(".anki2") path = os.path.abspath(path) create = not os.path.exists(path) diff --git a/rslib/src/backend.rs b/rslib/src/backend.rs index 43c8399d1..337e9c8ee 100644 --- a/rslib/src/backend.rs +++ b/rslib/src/backend.rs @@ -88,7 +88,6 @@ impl Backend { Value::TemplateRequirements(input) => { OValue::TemplateRequirements(self.template_requirements(input)?) } - Value::PlusOne(input) => OValue::PlusOne(self.plus_one(input)?), Value::SchedTimingToday(input) => { OValue::SchedTimingToday(self.sched_timing_today(input)) } @@ -102,11 +101,6 @@ impl Backend { }) } - fn plus_one(&self, input: pt::PlusOneIn) -> Result { - let num = input.num + 1; - Ok(pt::PlusOneOut { num }) - } - fn template_requirements( &self, input: pt::TemplateRequirementsIn,