Skip to content

Commit

Permalink
Fixed errors that would cause crash on init without a prior s ave
Browse files Browse the repository at this point in the history
  • Loading branch information
David O'Connor committed Sep 18, 2024
1 parent a843e74 commit 4845e7c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "plascad"
version = "0.7.3"
version = "0.7.4"
edition = "2021"
authors = ["David O'Connor <[email protected]>"]
#description = "Tools for plasmid and primer design, PCR, and related."
Expand Down
2 changes: 1 addition & 1 deletion src/gui/autocloning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ fn backbone_filters(filters: &mut BackboneFilters, ui: &mut Ui) {
}

pub fn autocloning_page(state: &mut State, ui: &mut Ui) {
ui.heading("Assisted cloning");
ui.heading("Assisted cloning (Work in progress)");
ui.label("For a given insert, automatically select a backbone, and either restriction enzymes, or PCR primers to use\
to clone the insert into the backbone.");

Expand Down
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ impl Default for State {
restriction_enzyme_lib: Default::default(),
backbone_lib: Default::default(),
reading_frame: Default::default(),
volatile: Default::default(),
volatile: vec![Default::default()],
search_seq: Default::default(),
backbone_selected: Default::default(),
cloning_res_matched: Default::default(),
Expand Down Expand Up @@ -637,6 +637,10 @@ impl State {

/// Identify restriction enzyme sites in the sequence.
pub fn sync_re_sites(&mut self) {
if self.active >= self.volatile.len() {
eprintln!("Error: Volatile len too short for RE sync.");
return;
}
self.volatile[self.active].restriction_enzyme_matches = Vec::new();

self.volatile[self.active]
Expand Down

0 comments on commit 4845e7c

Please sign in to comment.