Skip to content

Instantly share code, notes, and snippets.

View FraserLee's full-sized avatar

FraserLee

  • McGill University
  • Canada
View GitHub Profile
// MINIMUM FAILING SAMPLE : run with `cargo run -- <path to some file>`
// GOAL: to send an SSE event with warp whenever a file changes
// CURRENT: I've got this set up to do three things:
// 1. WORKING: Send, receive, and display an SSE event every 3 seconds
// 2. WORKING: Asynchronously watch a directory for changes, outputting to the console when a change is detected
// 3. FAILING: Send an SSE event when a change is detected
use std::convert::Infallible;
use std::path::Path;
import java.util.ArrayList;
import java.util.List;
enum types {
NUMBER, PLUS, HYPHEN, ASTERIX, SLASH, OBRACKET, CBRACKET, CARET, NO_VALUE
}
/**
* Created by Fraser Lee on 2017-07-24.
*/