There was an error while loading. Please reload this page.
2 parents 53d5729 + 899dd5a commit fe3e946Copy full SHA for fe3e946
1 file changed
src/script.rs
@@ -512,6 +512,13 @@ impl From<Vec<u8>> for Script {
512
fn from(v: Vec<u8>) -> Script { Script(v.into_boxed_slice()) }
513
}
514
515
+impl ops::Index<usize> for Script {
516
+ type Output = u8;
517
+ fn index(&self, index: usize) -> &u8 {
518
+ &self.0[index]
519
+ }
520
+}
521
+
522
impl ops::Index<ops::Range<usize>> for Script {
523
type Output = [u8];
524
fn index(&self, index: ops::Range<usize>) -> &[u8] {
0 commit comments