geti 0.2.0

A tool for auditing Arbitrum stylus Rust smart contracts
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// src/markdown.rs

use std::fs;
use std::path::Path;

pub fn read_markdown_file(path: &str) -> Result<String, String> {
    let path = Path::new(path);
    if !path.exists() {
        return Err(format!("Markdown file not found: {}", path.display()));
    }

    match fs::read_to_string(path) {
        Ok(content) => Ok(content),
        Err(e) => Err(format!("Failed to read Markdown file: {}", e)),
    }
}