Skip to content

Commit e6bafc7

Browse files
call add without 2nd argument (recursive) (#4)
1 parent ca37c60 commit e6bafc7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub fn get_module() -> Module {
5151
Ok::<_, phper::Error>(())
5252
})
5353
.argument(Argument::by_val("path"))
54-
.argument(Argument::by_val("recursive"));
54+
.argument(Argument::by_val_optional("recursive"));
5555

5656
watcher.add_method("watch", Visibility::Public, |this, arguments| {
5757
let handler = arguments.get_mut(0).unwrap();

tests/php/recommended_watcher.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
error_reporting(E_ALL);
66

77
$watcher = new FsNotify\RecommendedWatcher();
8+
$watcher->add(__DIR__);
89
$watcher->add(__DIR__, recursive: false);
910
$watcher->watch(function (FsNotify\Event $event) {
1011
var_dump($event->getKind());

0 commit comments

Comments
 (0)